Add gocyclo-check
This commit is contained in:
parent
56b704335e
commit
ec8a701191
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue