Add static-check

This commit is contained in:
kolaente 2020-09-01 22:02:51 +02:00
parent ec8a701191
commit 0e934f2635
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -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() {