github.com/pankona/gometalinter@v2.0.11+incompatible/_linters/src/honnef.co/go/tools/cmd/staticcheck/staticcheck.go (about)

     1  // staticcheck detects a myriad of bugs and inefficiencies in your
     2  // code.
     3  package main // import "honnef.co/go/tools/cmd/staticcheck"
     4  
     5  import (
     6  	"os"
     7  
     8  	"honnef.co/go/tools/lint/lintutil"
     9  	"honnef.co/go/tools/staticcheck"
    10  )
    11  
    12  func main() {
    13  	fs := lintutil.FlagSet("staticcheck")
    14  	gen := fs.Bool("generated", false, "Check generated code")
    15  	fs.Parse(os.Args[1:])
    16  	c := staticcheck.NewChecker()
    17  	c.CheckGenerated = *gen
    18  	cfg := lintutil.CheckerConfig{
    19  		Checker:     c,
    20  		ExitNonZero: true,
    21  	}
    22  	lintutil.ProcessFlagSet([]lintutil.CheckerConfig{cfg}, fs)
    23  }