1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

Add extra rule

This commit is contained in:
mgechev
2018-02-04 14:51:19 -08:00
parent bd04af7465
commit b5fc0eaffc
10 changed files with 201 additions and 34 deletions

17
test/cyclomatic_test.go Normal file
View File

@@ -0,0 +1,17 @@
package test
import (
"testing"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
func TestCyclomatic(t *testing.T) {
testRule(t, "cyclomatic", &rule.CyclomaticRule{}, &lint.RuleConfig{
Arguments: []interface{}{int64(1)},
})
testRule(t, "cyclomatic-2", &rule.CyclomaticRule{}, &lint.RuleConfig{
Arguments: []interface{}{int64(3)},
})
}