2022-07-15 15:32:10 +02:00
|
|
|
//golangcitest:args -Egocyclo
|
2022-08-15 18:23:07 +02:00
|
|
|
//golangcitest:config_path testdata/configs/gocyclo.yml
|
2018-05-06 15:24:45 +03:00
|
|
|
package testdata
|
|
|
|
|
2021-02-18 21:17:04 +01:00
|
|
|
import "net/http"
|
|
|
|
|
2022-08-20 18:53:45 +02:00
|
|
|
func GocycloBigComplexity(s string) { // want "cyclomatic complexity .* of func .* is high .*"
|
2021-02-18 21:17:04 +01:00
|
|
|
if s == http.MethodGet || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" {
|
2018-05-06 15:24:45 +03:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2018-06-10 17:10:56 +03:00
|
|
|
if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" {
|
2018-05-06 15:24:45 +03:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2018-06-10 17:10:56 +03:00
|
|
|
if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" {
|
2018-05-06 15:24:45 +03:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|