Skip to content
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

Ignore kondo config nested under the project root #765

Merged
merged 1 commit into from Feb 16, 2022

Conversation

mainej
Copy link
Collaborator

@mainej mainej commented Feb 16, 2022

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 added a new entry to CHANGELOG.md
  • I updated documentation if applicable (docs folder)

As discussed in this [thread][slack-thread], sometimes users would see
lint findings that didn't match their .clj-kondo config. This happend
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.

[slack-thread]: https://app.slack.com/client/T03RZGPFR/CPABC1H61/thread/CPABC1H61-1644946235.338589
@ericdallo ericdallo added the bug Something isn't working label Feb 16, 2022
@ericdallo ericdallo added this to In progress in clojure-lsp via automation Feb 16, 2022
@ericdallo ericdallo assigned ericdallo and mainej and unassigned ericdallo Feb 16, 2022
@ericdallo
Copy link
Member

Thank you!

@ericdallo ericdallo merged commit ebd4f4a into clojure-lsp:master Feb 16, 2022
clojure-lsp automation moved this from In progress to Next release Feb 16, 2022
@mainej mainej deleted the ignore-non-root-kondo-config branch February 16, 2022 15:56
@ericdallo ericdallo moved this from Next release to Done in clojure-lsp Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants