1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-15 01:04:40 +02:00

Improvements

This commit is contained in:
mgechev
2018-01-27 16:37:30 -08:00
parent 8746067321
commit 1870854374
7 changed files with 20 additions and 10 deletions

View File

@ -58,10 +58,10 @@ var rules = []lint.Rule{
func TestVarDeclaration(t *testing.T) {
testRule(t, "cyclomatic", &rule.CyclomaticRule{}, &lint.RuleConfig{
Arguments: []string{"1"},
Arguments: []interface{}{int64(1)},
})
testRule(t, "cyclomatic-2", &rule.CyclomaticRule{}, &lint.RuleConfig{
Arguments: []string{"3"},
Arguments: []interface{}{int64(3)},
})
}
@ -141,7 +141,9 @@ func assertFailures(t *testing.T, baseDir string, fi os.FileInfo, src []byte, ru
return errors.Errorf("Test file %v does not have instructions", fi.Name())
}
ps, err := l.Lint([]string{fi.Name()}, rules, config)
ps, err := l.Lint([]string{fi.Name()}, rules, lint.Config{
Rules: config,
})
if err != nil {
return err
}