New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alias usages not detected from keywords in quoted forms #981
Comments
A small workaround for now is to add a top-level keyword |
Yes we've indeed considered those as well but decided not to use them because of the possibility to accidentally cause false negatives by forgetting the references/exclusions while doing code refactors. Having to write the fully qualified keyword name is a bit annoying but at least it's robust over time and easier to maintain. |
Fixed on master. |
Wow that was fast! Thank you! |
Hi and thanks for this great tool! Here is a small issue we found while using it:
version
clj-kondo v2020.07.29
platform
Native version / OSX and Linux
problem
It seems that alias usages from quoted forms are not registered. If alias is used only in quoted form (real life example case: Datomic queries), clj-kondo gives
warning: namespace <ns> is required but never used
. However, if we remove the require, the code won't work anymore because reader can't recognize keyword without it.We've solve this by so far by using fully qualified keywords but it's a bit annoying because some of the namespaces can be quite long.
repro
Here is a very basic code reproducing the issue (uses default configs):
expected behavior
I'd expect the code to be linted without warnings, instead I get
The text was updated successfully, but these errors were encountered: