Add gocyclo-check

This commit is contained in:
kolaente 2020-09-01 21:59:53 +02:00
parent 56b704335e
commit ec8a701191
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,7 @@ var (
"got-swag": GotSwag,
"misspell-check": MisspellCheck,
"ineffassign-check": IneffassignCheck,
"gocyclo-check": GocycloCheck,
}
)
@ -325,8 +326,10 @@ func IneffassignCheck() {
runAndStreamOutput("ineffassign", GoFiles...)
}
// Checks for the cyclomatic complexity of the source code
func GocycloCheck() {
checkAndInstallGoTool("gocyclo", "github.com/fzipp/gocyclo")
runAndStreamOutput("gocyclo", append([]string{"-over", "49"}, GoFiles...)...)
}
func StaticCheck() {