-
Notifications
You must be signed in to change notification settings - Fork 985
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
Reduce Clojure linter warning noise #17491
Conversation
Jenkins BuildsClick to see older builds (8)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent :)) ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
although I tried run clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src
it seems the clj-kondo in status-mobile nix shell doesn't show warnings
my own one (newer version) do show warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reporting that @yqrashawn. I was super puzzled by that too, but then I found a fix in the Makefile. If we add a missing ampersand between the clj-kondo and the previous command , the target prints the warnings (see commit 2f29d3e). |
8788a4e
to
30ab933
Compare
30ab933
to
2f2f4dc
Compare
Warnings can be printed by: make lint CLJ_LINTER_PRINT_WARNINGS=true
2f2f4dc
to
e09032e
Compare
Summary
This PR changes the make
lint
target default behavior to NOT show clj-kondo warnings.In the CI I kept the same behavior, i.e. show all warnings and errors simultaneously.
Motivation
When devs run
make lint
, most of the time, they don't want to see a long list of warnings. Their focus is on the errors. Additionally, the majority of devs in the mobile team see clj-kondo warnings in their editors of choice already.We (some of us) believe the editor feedback/warnings are sufficiently noisy.
But I don't like this new default!
Okay, add the following somewhere in your config files:
export CLJ_LINTER_PRINT_WARNINGS=true
Do you think we should invert the logic?
I can also change this PR to invert the logic, i.e. we keep the current behavior (a bit noisy) and then devs can export a
CLJ_LINTER_HIDE_WARNINGS=true
in their own environments if they want less noise.Areas that may be impacted
None
Steps to test
make lint
make lint CLJ_LINTER_PRINT_WARNINGS=true
status: ready