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: err113 analyzer name #4567

Merged
merged 2 commits into from
Mar 28, 2024
Merged

feat: err113 analyzer name #4567

merged 2 commits into from
Mar 28, 2024

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 24, 2024

When a linter name is different from the analyzer name, the analyzer name is added to the report message.
In the context of err113, it's redundant.

Before
$ golangci-lint run 
main.go:13:10: err113: do not compare errors directly "err == e", use "errors.Is(err, e)" instead (goerr113)
                return err == e
                       ^
With the PR
$ golangci-lint run 
main.go:13:10: do not compare errors directly "err == e", use "errors.Is(err, e)" instead (err113)
                return err == e
                       ^

@ldez ldez added bug Something isn't working linter: update Update the linter implementation inside golangci-lint labels Mar 24, 2024
@ldez ldez changed the title fix: err113 and mnd analyzer names fix: err113 and gomnd analyzer names Mar 24, 2024
pkg/golinters/gomnd.go Outdated Show resolved Hide resolved
pkg/golinters/gomnd.go Outdated Show resolved Hide resolved
@ldez ldez changed the title fix: err113 and gomnd analyzer names feat: err113 and gomnd analyzer names Mar 24, 2024
@ldez ldez added enhancement New feature or improvement and removed bug Something isn't working labels Mar 24, 2024
@ldez ldez changed the title feat: err113 and gomnd analyzer names feat: fix err113 analyzer name, replace gomnd by mnd Mar 24, 2024
@ldez ldez changed the title feat: fix err113 analyzer name, replace gomnd by mnd fix: err113 analyzer name Mar 24, 2024
@ldez ldez mentioned this pull request Mar 24, 2024
@ldez ldez added bug Something isn't working and removed enhancement New feature or improvement labels Mar 24, 2024
Copy link
Contributor

@Antonboom Antonboom left a comment

Choose a reason for hiding this comment

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

block this due to #4572 (comment)

@ldez ldez added this to the next milestone Mar 28, 2024
@ldez ldez changed the title fix: err113 analyzer name feat: err113 analyzer name Mar 28, 2024
@ldez ldez added enhancement New feature or improvement and removed bug Something isn't working labels Mar 28, 2024
@ldez ldez merged commit a7868b3 into golangci:master Mar 28, 2024
13 checks passed
@ldez ldez deleted the fix/analyzer-names branch March 28, 2024 20:04
@ldez ldez modified the milestones: next, v1.58 May 8, 2024
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