@ericdallo idea:
clj-kondo has a :consistent-alias
linter, but you have to configure the aliases yourself in how you want to link full namespace names to aliases.
since clojure-lsp scans your entire project, it could figure out what aliases are already used the most for which namespace and then populate this map inside .clj-kondo/config.edn once.
looks a good idea!
If i have a namespace on this linter for example, str
for clojure.string
and I write a string/join
and require it, it will complain about it, is that right?
correct
nice, we probably would do that every first time we scan the project?
I mean, when we do a classpath scan, (new deps or deps changed)
yeah and only if the alias isn't already in there
and probably also only when you enable it
yes, it'd need to be in a disabled feature flag for now
Created this: https://github.com/clojure-lsp/clojure-lsp/issues/388