Fork me on GitHub
#clj-kondo
<
2021-11-17
>
Adam Helins10:11:05

Is there any way for passing something from the CLI to hooks? Since System/getProperty is not supported by SCI

borkdude10:11:27

Currently not. Can you describe your use case?

Adam Helins10:11:39

Not strictly necessary but it would make my hook more accurate. Essentially, there is a macro selecting code based on a property, akin to the reader conditionals if you will. It would be nice being able to indicate the hook which code should be selected and processed, discarding the rest.

borkdude10:11:55

but isn't the property depending on the runtime, which is not available in general in static analysis?

Adam Helins10:11:08

Yes, so analysis should be run twice in this case (2 possibilities for selecting code), but it would be best maintaining one config

juhoteperi11:11:22

Hey, can I access the var meta in custom hook for defn? Like (defn ^Return foobar [] ...). Taking the fn name node and looking at meta only returns the position info, not :tag.

juhoteperi11:11:06

Ha, found it. This is in the node :meta.

1