Fork me on GitHub

I have a working title for "discouraged var", for configuring vars that you'd rather not use in your program (think eval, read-string, whatever). Any alternative names?

Noah Bogart13:04:14

Discourage, deny, disallow, exclude, reject, block


I'll stay with discouraged then

Noah Bogart14:04:41

I think that's the best choice too


$ clojure -M:clj-kondo/dev --lint - --config '{:linters {:discouraged-var {clojure.core/inc {:message "Incrementing numbers is dangerous"}}}}' <<< '(inc 1)'
<stdin>:1:1: warning: Incrementing numbers is dangerous

🎉 2
😂 2
Noah Bogart14:04:34

Will there be a default message?

Noah Bogart14:04:56

That’s beautiful. Thank you so much


clj-kondo v2022.04.23 new linter :keyword-binding - warns when a keyword is used in a :keys binding vector. This linter is :off by default. See • new linter :discouraged-var. See • new :config-in-ns configuration option. See • Support :ns-groups configuration option. See support bindings with same name in clojure.core.match fix false positive unused import • dot (`.`) should be unresolved when not in fn position

❤️ 4
wow 1
clj-kondo 1

Thank you for :config-in-ns! This will help a lot!