Skip to content

Conversation

@nishanths
Copy link
Contributor

https://github.com/nishanths/predeclared

This adds the predeclared linter, which reports code that shadows one of Go's predeclared identifiers.

@CLAassistant
Copy link

CLAassistant commented Jan 2, 2021

CLA assistant check
All committers have signed the CLA.

@nishanths nishanths marked this pull request as ready for review January 2, 2021 13:05
@nishanths
Copy link
Contributor Author

Fixed the tests. This should be ready for review.

@nishanths nishanths added the linter: new Support new linter label Jan 2, 2021
@iwankgb
Copy link
Contributor

iwankgb commented Jan 5, 2021

@golangci/team is anyone opposed to adding this linter?

@Nivl
Copy link
Contributor

Nivl commented Jan 6, 2021

@golangci/team is anyone opposed to adding this linter?

I'm not. I actually like it a lot.

@magnetikonline
Copy link
Contributor

magnetikonline commented Jan 6, 2021

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!

@nishanths
Copy link
Contributor Author

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?

@ldez ldez merged commit 76c4521 into golangci:master Jan 7, 2021
@nishanths nishanths deleted the predeclared branch January 7, 2021 18:20
ashanbrown pushed a commit to ashanbrown/golangci-lint that referenced this pull request Feb 20, 2021
@ldez ldez added this to the v1.35 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linter: new Support new linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants