2019-12-14 09:27:06 +02:00
|
|
|
package test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/mgechev/revive/lint"
|
|
|
|
"github.com/mgechev/revive/rule"
|
|
|
|
)
|
|
|
|
|
2024-11-20 21:19:17 +02:00
|
|
|
func TestCognitiveComplexityDefault(t *testing.T) {
|
|
|
|
testRule(t, "cognitive_complexity_default", &rule.CognitiveComplexityRule{}, &lint.RuleConfig{})
|
|
|
|
}
|
|
|
|
|
2019-12-14 09:27:06 +02:00
|
|
|
func TestCognitiveComplexity(t *testing.T) {
|
2024-11-11 13:39:10 +02:00
|
|
|
testRule(t, "cognitive_complexity", &rule.CognitiveComplexityRule{}, &lint.RuleConfig{
|
2023-09-24 08:44:02 +02:00
|
|
|
Arguments: []any{int64(0)},
|
2019-12-14 09:27:06 +02:00
|
|
|
})
|
|
|
|
}
|