Add static-check
This commit is contained in:
parent
ec8a701191
commit
0e934f2635
|
@ -60,6 +60,7 @@ var (
|
|||
"misspell-check": MisspellCheck,
|
||||
"ineffassign-check": IneffassignCheck,
|
||||
"gocyclo-check": GocycloCheck,
|
||||
"static-check": StaticCheck,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -332,8 +333,10 @@ func GocycloCheck() {
|
|||
runAndStreamOutput("gocyclo", append([]string{"-over", "49"}, GoFiles...)...)
|
||||
}
|
||||
|
||||
// Statically analyzes the source code about a range of different problems
|
||||
func StaticCheck() {
|
||||
|
||||
checkAndInstallGoTool("staticcheck", "honnef.co/go/tools/cmd/staticcheck")
|
||||
runAndStreamOutput("staticcheck", ApiPackages...)
|
||||
}
|
||||
|
||||
func GoSecCheck() {
|
||||
|
|
Loading…
Reference in New Issue