github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/test/testdata/gocyclo.go (about) 1 //golangcitest:args -Egocyclo 2 //golangcitest:config_path testdata/configs/gocyclo.yml 3 package testdata 4 5 import "net/http" 6 7 func GocycloBigComplexity(s string) { // want "cyclomatic complexity .* of func .* is high .*" 8 if s == http.MethodGet || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" { 9 return 10 } 11 12 if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" { 13 return 14 } 15 16 if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" { 17 return 18 } 19 }