Skip to content

A Go linter for ensuring buffer scanners are managed correctly

License

Notifications You must be signed in to change notification settings

raidancampbell/scancheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scancheck

scancheck is a linter to ensure the bufio.Scanner is used correctly. Currently, it only checks to ensure that callers to a scanner's Err() don't occur within the scanner's for scanner.Scan() loop.

Status

This linter errs on the side of false-negatives, and currently doesn't handle the following scenarios

  • a bufio.Scanner being returned from a non-new function
  • aliased bufio package
  • nested loops of different bufio.Scanner instances

Usage

go install .
# OR
go build .

# navigate to your desired go project to lint
scancheck ./...

About

A Go linter for ensuring buffer scanners are managed correctly

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages