1
0
mirror of https://github.com/mgechev/revive.git synced 2024-12-12 10:44:59 +02:00
revive/testdata/cognitive_complexity_default.go

14 lines
242 B
Go

package pkg
func l() { // MATCH /function l has cognitive complexity 8 (> max enabled 7)/
for i := 1; i <= max; i++ {
for j := 2; j < i; j++ {
if (i%j == 0) || (i%j == 1) {
continue
}
total += i
}
}
return total && max
}