Skip to content

Feature request: allow //nolint only on certain linters #889

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

Closed
benjaminjkraft opened this issue Dec 16, 2019 · 3 comments
Closed

Feature request: allow //nolint only on certain linters #889

benjaminjkraft opened this issue Dec 16, 2019 · 3 comments
Assignees
Labels
area: nolint Related to nolint directive and nolintlint enhancement New feature or improvement

Comments

@benjaminjkraft
Copy link

We'd like to be able to say, in our configuration: you may //nolint these linters, but not those. Currently, there's no way to do this, as far as I know.

A few examples of why this could be useful:

Ideally, one could enable this behavior for arbitrary files, regexp-matches, etc., just like excludes, but simply opting in/out on a per-linter basis is probably good enough for us.

@tpounds tpounds added the enhancement New feature or improvement label Dec 30, 2019
@stale
Copy link

stale bot commented Dec 31, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Dec 31, 2020
@ashanbrown ashanbrown self-assigned this Dec 31, 2020
@SVilgelm
Copy link
Member

We solved such problem by using a custom config in CI, just only those required linters are enabled and run golangci-lint with that config for all repos. The project owners can have their own config with any linters they want, but the code must pass the with the CI's config

@stale stale bot removed the stale No recent correspondence or work activity label Dec 31, 2020
@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Jan 8, 2022
@stale stale bot closed this as completed Apr 16, 2022
@ldez ldez added area: nolint Related to nolint directive and nolintlint and removed stale No recent correspondence or work activity labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nolint Related to nolint directive and nolintlint enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

5 participants