Skip to content

fix: order of staticcheck settings during migration #5741

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

Merged
merged 4 commits into from
Apr 16, 2025

Conversation

sivchari
Copy link
Member

Currently, toStaticCheckSettings only treat order to make unique slice. So if we receive such as []string{"all", "-S1000"} from staticcheck, the output results in []string{"-S1000", "all"}. The rule that has minus symbol means the rule will be disabled from previous one. It means that current order must be failed if developer doesn't fix it, so I fixed it.

@ldez ldez changed the title fix: toStaticCheckSettings fix: staticcheck settings migration Apr 16, 2025
@ldez ldez self-requested a review April 16, 2025 13:23
@ldez ldez added the bug Something isn't working label Apr 16, 2025
@ldez ldez added this to the v2-unreleased milestone Apr 16, 2025
@ldez ldez changed the title fix: staticcheck settings migration fix: order of staticcheck settings during migration Apr 16, 2025
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit 43e07c4 into golangci:main Apr 16, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: migration bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants