gopkg.in/golangci/golangci-lint.v1@v1.10.1/test/testdata/gocyclo.go (about)

     1  // args: -Egocyclo --gocyclo.min-complexity=20
     2  package testdata
     3  
     4  func GocycloBigComplexity(s string) { // ERROR "cyclomatic complexity .* of func .* is high .*"
     5  	if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" {
     6  		return
     7  	}
     8  
     9  	if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" {
    10  		return
    11  	}
    12  
    13  	if s == "1" || s == "2" || s == "3" || s == "4" || s == "5" || s == "6" || s == "7" {
    14  		return
    15  	}
    16  }