github.com/gwaycc/gometalinter@v3.0.0+incompatible/_linters/src/honnef.co/go/tools/cmd/staticcheck/staticcheck.go (about) 1 // staticcheck analyses Go code and makes it better. 2 package main // import "honnef.co/go/tools/cmd/staticcheck" 3 4 import ( 5 "os" 6 7 "honnef.co/go/tools/lint" 8 "honnef.co/go/tools/lint/lintutil" 9 "honnef.co/go/tools/simple" 10 "honnef.co/go/tools/staticcheck" 11 "honnef.co/go/tools/stylecheck" 12 "honnef.co/go/tools/unused" 13 ) 14 15 func main() { 16 fs := lintutil.FlagSet("staticcheck") 17 fs.Parse(os.Args[1:]) 18 19 checkers := []lint.Checker{ 20 simple.NewChecker(), 21 staticcheck.NewChecker(), 22 stylecheck.NewChecker(), 23 } 24 25 uc := unused.NewChecker(unused.CheckAll) 26 uc.ConsiderReflection = true 27 checkers = append(checkers, unused.NewLintChecker(uc)) 28 29 lintutil.ProcessFlagSet(checkers, fs) 30 }