You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that only a few people are understanding how the current configuration works.
For example, what those configurations are doing?
linters:
disable-all: trueenable:
- reviveissues:
exclude-use-default: true # <-- the difference is hereinclude:
- EXC0012 # related to revive and comments
- EXC0013 # related to revive and comments
- EXC0014 # related to revive and comments
- EXC0015 # related to revive and comments
linters:
disable-all: trueenable:
- reviveissues:
exclude-use-default: false # <-- the difference is hereinclude:
- EXC0012 # related to revive and comments
- EXC0013 # related to revive and comments
- EXC0014 # related to revive and comments
- EXC0015 # related to revive and comments
answers
The first configuration enables all the default exclusions but disables EXC0012, EXC0013, etc.
The second configuration disables all the default exclusions and that's all.
The include section is ignored because this is only a filter on default exclusions.
This is great, I think it is in the spirit of us not dictating what should be linted or not. I fully see the original argument by Denis but I think there might be other approaches to it. Having a separate exclusion set that's not linter config always felt weird to me. If the linters are there, enabled by the user or default, I think its rules should also be run. If the rule isn't of interest, the linter setting should be setup to disable it. Having exclusions for non default linters feels even more strange to me.
Sadly not all linters have settings for these things so using exclusions is fine - but I think it should be setup or opted in by the user and not us.
These things are hard because we never know how users would use or approach the issues. Maybe all those guesstimated code bases without comments would actually have them if the default linter setup flagged it?
Sorry for off topic but...
I think this also leaks in the sharable presets territory (which should not be addressed now) but if we imagine a future where you can share a setup that's not only a set of enabled linters but also how they are configured and a set up exclusions, we could completely remove this and replace it with something like that. As with ESLint, that would just be a standard preset (by us or someone else) extended with any or all of these patterns. That is close to your suggestion, but the current suggestion splits the concept of sharable linters and exclusions into two topics (and doesn't address sharable or pre configured linter settings).
Should we have a legacy preset that excludes exactly what we do now to make upgrading easier? Maybe extra important if we don't plan to move all current exclusions into one of the new presets?
Important
This is a proposal: I don't know if it is possible and what the impact could be inside the code.
The proposal may evolve.
The current configuration:
⛑️ Problems
Useful vs Good Practice
I agree with Denis: most projects don't add docs and don't want to add docs.
#456 (comment)
But I also agree that is not a good practice.
#456 (comment)
The Names of the Embed Exclusions
The codes of the default exclusions are machine-oriented but we are humans.
os.Close
)Include?
I think that only a few people are understanding how the current configuration works.
For example, what those configurations are doing?
answers
The first configuration enables all the default exclusions but disables EXC0012, EXC0013, etc.
The second configuration disables all the default exclusions and that's all.
The
include
section is ignored because this is only a filter on default exclusions.Existing Issues
💭 The Proposal
exclude-use-default
comments
-> EXC0011, EXC0012, EXC0013, EXC0014, EXC0015stdErrorHandling
-> EXC0001commonFalsePositives
-> EXC0006, EXC0007, EXC0010golint
: EXC0002 (comments), EXC0003The text was updated successfully, but these errors were encountered: