-
Notifications
You must be signed in to change notification settings - Fork 313
Description
Describe the bug
The RULES_DESCRIPTIONS.md promises about the var-naming rule:
By default, the rule behaves exactly as the alternative in golint but optionally, you can relax it (see golang/lint#89).
However, the new v1.13.0 behavior of skipPackageNameCollisionWithGoStd conflicts with that promise, making our behavior stricter than the original.
Given the following folder structure:
http/
http.go
And given the following content of http.go:
# Package http contains helpers.
package httpThe original behavior of golint gives no errors.
$ go install golang.org/x/lint/golint@latest
$ cd http
$ golint .To Reproduce
Steps to reproduce the behavior:
- I updated revive
go install github.com/mgechev/revive@latest - I run it with no flags & no configuration file, inside the
httpfolder described above:
revive .Expected behavior
No errors.
Logs
http.go:2:9: avoid package names that conflict with Go standard library package names
Desktop (please complete the following information):
- OS: Fedora 43
- Version of Go: 1.25.4
Additional context
The last version of revive with the expected behavior is v1.12.0.