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

Lint all files regardless of build tags #1646

Closed
silverwind opened this issue Jan 12, 2021 · 3 comments
Closed

Lint all files regardless of build tags #1646

silverwind opened this issue Jan 12, 2021 · 3 comments
Labels
enhancement New feature or improvement stale No recent correspondence or work activity

Comments

@silverwind
Copy link
Contributor

silverwind commented Jan 12, 2021

Is your feature request related to a problem? Please describe.
On projects with many different build tags, it's often necessary to run golangci-lint multiple times to cover all --build-tags to get all files linted which leads to very long lint times primarily caused by the same files linted multiple times.

Describe the solution you'd like
A option like --all-tags which would ignore any tags present in a file and lint it regardless. Maybe used in combination with a explicit list of files and folders given as an argument.

Describe alternatives you've considered
Don't think there are any.

Additional context
Assuming golangci-lint does only static analysis, it should be possible to just ignore build tags and lint all files.

@silverwind silverwind added the enhancement New feature or improvement label Jan 12, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 12, 2021

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@padamstx
Copy link

padamstx commented Apr 23, 2021

In some of my Go projects, I'll use various build tags for tests like fast, slow, <feature-name>, <component-name>, etc., but I typically also add "all" wherever I use one or more of the other tags (e.g. // +build all fast).
That way if i want to run all tests, I just use something like go test -tags=all. Perhaps this could be useful in your situation as well.

@stale
Copy link

stale bot commented Apr 27, 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 Apr 27, 2022
@stale stale bot closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement stale No recent correspondence or work activity
Projects
None yet
Development

No branches or pull requests

2 participants