Fork me on GitHub
#clj-kondo
<
2022-04-23
>
borkdude12:04:50

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

borkdude14:04:33

I'll stay with discouraged then

Noah Bogart14:04:41

I think that's the best choice too

borkdude14:04:28

$ 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

borkdude20:04:30

clj-kondo v2022.04.23https://github.com/clj-kondo/clj-kondo/issues/1653: new linter :keyword-binding - warns when a keyword is used in a :keys binding vector. This linter is :off by default. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#keyword-in-binding-vector. • https://github.com/clj-kondo/clj-kondo/issues/996: new linter :discouraged-var. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#discouraged-var. • https://github.com/clj-kondo/clj-kondo/issues/1618: new :config-in-ns configuration option. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#config-in-ns. • Support :ns-groups configuration option. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#namespace-groupshttps://github.com/clj-kondo/clj-kondo/issues/1657: support bindings with same name in clojure.core.matchhttps://github.com/clj-kondo/clj-kondo/issues/1659: fix false positive unused import • https://github.com/clj-kondo/clj-kondo/issues/1649: dot (`.`) should be unresolved when not in fn position

❤️ 4
wow 1
clj-kondo 1
nate00:04:57

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