示例#1
0
func main() {
	unusedChecker := unused.NewChecker(unused.CheckAll)
	unusedChecker.WholeProgram = true
	meta := metaChecker{
		checkers: []lint.Checker{
			simple.NewChecker(),
			staticcheck.NewChecker(),
			unused.NewLintChecker(unusedChecker),
		},
	}
	lintutil.ProcessArgs("metacheck", &meta, os.Args[1:])
}
示例#2
0
func main() {
	checker := unused.NewChecker(unused.CheckAll)
	checker.WholeProgram = true
	funcs := map[string]lint.Func{
		"U1000": unused.NewLintRunner(checker),
	}
	for n, f := range staticcheck.Funcs {
		funcs[n] = f
	}
	for n, f := range simple.Funcs {
		funcs[n] = f
	}
	lintutil.ProcessArgs("metacheck", funcs, os.Args[1:])
}