How do I add an analyze-hook for a custom assert-expr assertion?
I could ignore the unresolved-symbol warning with
:exclude [(clojure.test/is [my-assertion])]But I'd love to add some lints specific to this assertion and I can't really figure out how to do that
one way is to write a "stub" macro with the same name and args that calls (throw (ex-info "don't use me!" {})) , so it appears in your :require block and clj-kondo will naturally lint it, and you'll get a warning if you use it outside of is blocks
and then if you need even more specific linting, you can write a hook for that macro
Hm ok so that only works if the user refers the macro right?
but users should be requiring the namespace that defines the method everywhere it's used anyway, to avoid load issues
hello, i’m not sure if i missed it in the clj-kondo codebase but is there a built-in linter for the “dots inside symbols” JS property access syntax that accidentally works but is not recommended (https://cljs.github.io/api/syntax/dot)?
As far as I'm concerned, this ship has long sailed and using dots is something most people use, without problems
But perhaps ask in #shadow-cljs to be sure, I wonder what @thheller thinks about it
(you can ping me there)
will do. thanks!