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

exported: report differently a method that case was altered #1236

Open
ccoVeille opened this issue Feb 12, 2025 · 2 comments
Open

exported: report differently a method that case was altered #1236

ccoVeille opened this issue Feb 12, 2025 · 2 comments

Comments

@ccoVeille
Copy link
Contributor

ccoVeille commented Feb 12, 2025

package sandbox

// Foo is OK
func Foo() {}

// FoobarQuux was renamed to FooBarQuux
func FooBarQuux() {}

The classic example of this is a method where an acronym or a Go initialisms was fixed

CheckJson => CheckJSON

revive reports the right things yet, but it could be improved.

Image

But because golangci-lint exclude EXC0012 by default.
This one is not reported via golangci-lint.

We should consider trying to detect it, and report another message that won't be caught by EXC0012

Here the idea is to compare the lowercase name of the method, we can be 100% sure the method was renamed.

Please note #1235 is a special case of #1236

@chavacava
Copy link
Collaborator

IMO there is not enough aggregated value to justify the enhancement (but it's only my opinion)

@ccoVeille
Copy link
Contributor Author

Let's stick with #1235 then, and use a wording that fits both, OK for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants