-
Notifications
You must be signed in to change notification settings - Fork 363
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
Disable all first then enable needed linters #439
Disable all first then enable needed linters #439
Conversation
Codecov Report
@@ Coverage Diff @@
## master #439 +/- ##
=======================================
Coverage 56.25% 56.25%
=======================================
Files 19 19
Lines 928 928
=======================================
Hits 522 522
Misses 351 351
Partials 55 55 Continue to review full report at Codecov.
|
I'm not sure I understand what is the problem here. I cannot find any filtering of linter results going on when running with Besides, I think the enabled linters are correct and some are active by default whereas others are enabled explicitly. Iow, the list of enabled linters in our |
This is the key part. If we don't disable all first, we might be adding more into already enabled ones or our config is noop. However, if we disable first, then the enable list explicitly specifies what is active. It's somehow related to silence some linters which are useful in the context of high performant server application, but not in a cli such as predeclared. |
Alright. Being explicit about the active linters would be nice. There is some difference between the 17 active linters in this PR (deadcode errcheck gocritic gofmt goimports golint gosimple interfacer maligned misspell prealloc staticcheck structcheck stylecheck unconvert unparam varcheck) vs. the 21 currently active on master (deadcode errcheck gocritic gofmt goimports golint gosimple govet ineffassign interfacer maligned misspell prealloc staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck). Would you care to clarify why you want to disable those four linters? |
Sorry for the typo, I had meant prealloc, instead of predeclared. |
Sure, actually my intention was to be explicit and then disable one by one with a discussion. For this goal to happen, I need to ensure that active linter list isn't modified in this PR. Let me update. However, I won't enable typecheck because it's already covered by tests. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmetb, ferhatelmas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First disable all linters then enable what we need. Otherwise, all linters are running then results are filtered. See with
-v
flag.Also, sort enabled linters in config.