github.com/nozzle/golangci-lint@v1.49.0-nz3/test/testdata/cyclop.go (about) 1 //golangcitest:args -Ecyclop 2 //golangcitest:config_path testdata/configs/cyclop.yml 3 package testdata 4 5 func cyclopComplexFunc(s string) { // want "calculated cyclomatic complexity for function cyclopComplexFunc is 22, max is 15" 6 if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" { 7 return 8 } 9 if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" { 10 return 11 } 12 if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" { 13 return 14 } 15 }