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:
17
test/cyclomatic_test.go
Normal file
17
test/cyclomatic_test.go
Normal 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)},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user