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

feat: merge staticcheck, stylecheck, gosimple #5487

Merged
merged 4 commits into from
Mar 4, 2025

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 1, 2025

This PR merges the staticcheck analyzers (stylecheck, gosimple, staticcheck) together.
I'm doing that because this is how staticcheck works.

By doing this merge, in addition to removing the default exclusions and removing alternative names in previous PRs, the integration of staticcheck will work more like staticcheck the binary.

The initial decision to not merge all the analyzers was to not be breaking when megacheck (the previous name of staticcheck) was rewritten.

The v2 is the right moment to break and try to have a better implementation.

This PR also adds a new set of staticcheck analyzers called quickfix to follow staticcheck the binary.

@ldez ldez added enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint labels Mar 1, 2025
@ldez ldez added this to the v2-unreleased milestone Mar 1, 2025
@ldez ldez requested review from bombsimon and alexandear and removed request for bombsimon March 1, 2025 20:25
@ldez ldez force-pushed the feat/staticcheck branch from 2a3f29b to e952e27 Compare March 4, 2025 13:57
@ldez ldez merged commit e564cce into golangci:main Mar 4, 2025
18 checks passed
@ldez ldez deleted the feat/staticcheck branch March 4, 2025 14:12
@busser busser mentioned this pull request Mar 14, 2025
Closed
@ldez ldez modified the milestones: v2-unreleased, v2 Mar 24, 2025
@dominikh
Copy link

Do note that staticcheck does not run the quickfix analyzers. Those are highly optional automatic rewrites intended for integration with gopls.

@ccoVeille
Copy link
Contributor

ccoVeille commented Mar 25, 2025

Could quickfixes be part of what you defined as a "preset" ? So we can disable them if needed

For now, I silenced Morgan Law one QF1001 that is terribly noisy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants