I'm having difficulty figuring out if kondo will lint unresolved-symbols on required namespaces. I've got my cache updated, and I would expect str/bar
to be unresolved.
(ns foo
(:require [clojure.string :as str]))
(str/bar)
@snoe clj-kondo doesn't do that, to prevent false positives.
Another question, is it possible for uneval #_
to follow the :skip-comments
rule? This seems inconsistent to me, but maybe there's another flag I couldn't find.
there is an issue about it, could be an option I think (unresolved symbols of known namespaces)
I might take a look at it then. It seems with :exclude rules false positives could be eliminated per project
Yes. Unresolved symbol linter could take fully qualified symbols I guess
The idea here is that one usually evaluates code in a rich comment block, but #_ is just for eliminating code more easily than with ;;
Right, so when our team comments out code with #_
it's usually to keep that code around for a reason (otherwise we'd delete it), and the unused namespaces lints trigger, or signatures change and the commented block gets missed.
we could make that opt in I guess, with :lint-unevals
or something.