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
Support namespace groups in unresolved-namespace linter #2025
Comments
@Juholei Thanks for the issue. Can you give me more context in the form of real code so I can understand the problem better? Other options:
|
We use yesql (or its fork jeesql) sql library which generates functions based on sql files the project. These are then namespaced with a macro defined here in our project https://github.com/solita/etp-core/blob/26b24be0e0bb5b82d93be73ade4952320564a3c1/etp-backend/src/main/clj/solita/etp/db.clj#L79. So the functions and namespaces are generated during runtime so they cannot be required in the actual code files as far as I can tell. Your suggested other option would work too for this issue. |
That doesn't mean you can't write a |
I mean, you just have to ensure that the creation of those namespaces is done before you require those namespaces. |
But happy to support both options. |
|
Is your feature request related to a problem? Please describe.
We use an sql library that generates query namespaces in a macro so when running clj-kondo it gives us a lot of unresolved namespace warnings. It would be nice to be able exclude these without listing every single one of the generated namespaces.
Describe the solution you'd like
https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#namespace-groups says to create an issue if you want support for namespace groups for other linters. For our problem it would be a solution to define a namespace group with pattern ".*-db$" if unresolved-namespace linter also supported namespace groups.
Describe alternatives you've considered
I haven't come up with any other solution apart from listing all the namespaces manually to be excluded.
The text was updated successfully, but these errors were encountered: