clj-kondo

https://github.com/clj-kondo/clj-kondo
dominicm 2021-01-15T09:36:39.015100Z

We're starting to mark some code as deprecated, and I didn't see any kondo tests for deprecated namespaces. Clojure has hinted at supporting this: https://clojure.atlassian.net/browse/CLJ-706? I'm guessing kondo doesn't by lack of tests.

borkdude 2021-01-15T09:37:28.015800Z

clj-kondo does lint deprecated vars, but not deprecated nss. Feel free to create an issue

dominicm 2021-01-15T09:37:39.015900Z

Cool :).

borkdude 2021-01-15T09:38:39.016200Z

oh, I see there is no clear standard for this yet?

dominicm 2021-01-15T09:39:07.016600Z

I think there's a clear standard, just no clear impl in clojure itself yet.

borkdude 2021-01-15T09:39:18.016900Z

I guess detecting :deprecated true or :deprecated "1.10.1" in the metadata of the ns is sufficient

dominicm 2021-01-15T09:39:23.017Z

Yup

dominicm 2021-01-15T09:43:08.017100Z

Cool, opened :)

borkdude 2021-01-15T09:44:09.017300Z

> A warning similar to the one when using a deprecated namespace you mean var right?

2021-01-15T14:10:39.019800Z

❯ echo '(defn- foo [x] (when x (foo false)))' | clj-kondo --lint -
linting took 14ms, errors: 0, warnings: 0
this might be a little bit odd false-positive linting result private foo is not used anywhere except in foo’s body compare with that
❯ echo '(defn- foo [x] (when x 1))' | clj-kondo --lint -
<stdin>:1:8: warning: Unused private var user/foo
linting took 11ms, errors: 0, warnings: 1
is it worth to file an issue?

borkdude 2021-01-15T14:22:00.020200Z

yeah, I think that warrants an issue. I think carve already handles this correctly