You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Since methods are on different types, I expect check to pass
Logs
✘ https://revive.run/r#confusing-naming Method 'method' differs only by capitalization to function'method'in the same source file
test/test.go:11:16
✘ 1 problem (1 error, 0 warnings)
Errors:
1 confusing-naming
Desktop (please complete the following information):
OS: [macOS]
Version of Go: 1.22
Additional context
The issue is previously mentioned in #864 but the error persists if the receiver of the method is of pointer type. Is this the expected behaviour?
I'm relatively new to go, sorry if this issue is due to my misunderstanding or lack of knowledge.
The text was updated successfully, but these errors were encountered:
Hi @emredalkiran thanks for reporting the issue. I think the linter should be able to differentiate both methods and do not raise a warning in cases like yours.
Describe the bug
confusing-naming
check possibly misfires on different named methods of generic types.To Reproduce
Steps to reproduce the behavior:
go install github.com/mgechev/revive@latest
command:
config:
test.go:
Expected behavior
Since methods are on different types, I expect check to pass
Logs
Desktop (please complete the following information):
Additional context
The issue is previously mentioned in #864 but the error persists if the receiver of the method is of pointer type. Is this the expected behaviour?
I'm relatively new to
go
, sorry if this issue is due to my misunderstanding or lack of knowledge.The text was updated successfully, but these errors were encountered: