-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 scancheck linter #4925
base: master
Are you sure you want to change the base?
Add scancheck linter #4925
Conversation
Hey, thank you for opening your first Pull Request ! |
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements.
Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
The intent of this PR is to add a new linter,
scancheck
.This is a small linter designed to catch an error where the
bufio.Scanner
is used within afor
loop, and thescanner.Err()
is erroneously referenced inside the loop, instead of outside the loop.scanner.Err()
will always benil
ifscanner.Scan()
returnstrue
.example:
It has performed accurately on a known-bad codebase, found nothing in the large sample
golang
andkubernetes
repositories.