api/vendor/honnef.co/go/tools/cmd/staticcheck/staticcheck.go

28 lines
571 B
Go
Raw Normal View History

2019-02-18 19:32:41 +00:00
// staticcheck analyses Go code and makes it better.
2018-12-31 01:18:41 +00:00
package main // import "honnef.co/go/tools/cmd/staticcheck"
import (
"os"
2019-02-18 19:32:41 +00:00
"honnef.co/go/tools/lint"
2018-12-31 01:18:41 +00:00
"honnef.co/go/tools/lint/lintutil"
2019-02-18 19:32:41 +00:00
"honnef.co/go/tools/simple"
2018-12-31 01:18:41 +00:00
"honnef.co/go/tools/staticcheck"
2019-02-18 19:32:41 +00:00
"honnef.co/go/tools/stylecheck"
"honnef.co/go/tools/unused"
2018-12-31 01:18:41 +00:00
)
func main() {
fs := lintutil.FlagSet("staticcheck")
fs.Parse(os.Args[1:])
2019-02-18 19:32:41 +00:00
checkers := []lint.Checker{
simple.NewChecker(),
staticcheck.NewChecker(),
stylecheck.NewChecker(),
2019-04-22 10:59:42 +00:00
&unused.Checker{},
2018-12-31 01:18:41 +00:00
}
2019-02-18 19:32:41 +00:00
lintutil.ProcessFlagSet(checkers, fs)
2018-12-31 01:18:41 +00:00
}