Ignore kondo config nested under the project root #765
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in this thread, sometimes users would see
lint findings that didn't match their .clj-kondo config. This happened
both on the command line and in editors.
It was determined that if a user had, for example, both a .clj-kondo
directory and a lib/.clj-kondo directory, the settings in the second
would take precedence when clojure-lsp linted an individual file in
lib/.
The root config is used when invoking
clj-kondo
on the command line,leading to different results depending on which tool linted the file.
We think that users never intend to have a nested config directory. If
they do, they should delete it, perhaps after merging its settings into
the root config directory.
But, to prevent confusion, this patch makes clojure-lsp ignore nested
config dirs when linting individual files.
I created a issue to discuss the problem I am trying to solve or there is already a open issue.See Slack thread.I updated documentation if applicable (docs
folder)