-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add 'predeclared' linter #1606
add 'predeclared' linter #1606
Conversation
Fixed the tests. This should be ready for review. |
@golangci/team is anyone opposed to adding this linter? |
I'm not. I actually like it a lot. |
Yep, agree too. TIL this was actually possible and this is valid Go code: package main
import "fmt"
func main() {
fmt.Println("Hello")
append()
}
func append() {
fmt.Println("Hello")
} I'd almost argue this should be a default linter! |
Thanks for reviewing. It looks like I have the ability to merge this pull request. Shall I go ahead, or should I wait for a maintainer to merge this/more reviews? |
https://github.com/nishanths/predeclared
This adds the
predeclared
linter, which reports code that shadows one of Go's predeclared identifiers.