Skip to content

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
@ldez ldez force-pushed the fix/analyzer-names branch from 858bd18 to d38c49e Compare March 24, 2024 13:07
@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 force-pushed the fix/analyzer-names branch from d38c49e to 82a623c Compare March 24, 2024 17:15
@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 force-pushed the fix/analyzer-names branch from 82a623c to ab9d034 Compare March 24, 2024 17:54
@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 force-pushed the fix/analyzer-names branch from 6b4ea7f to dcb0586 Compare March 28, 2024 19:52
@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
@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