1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-27 22:18:41 +02:00

optimizes import-blacklist (#123)

This commit is contained in:
SalvadorC
2019-04-22 19:58:02 +02:00
committed by Minko Gechev
parent 2474f6cecb
commit e8c1baf8ac
2 changed files with 26 additions and 33 deletions

View File

@@ -14,3 +14,13 @@ func TestImportsBlacklist(t *testing.T) {
Arguments: args,
})
}
func BenchmarkImportsBlacklist(b *testing.B) {
args := []interface{}{"crypto/md5", "crypto/sha1"}
var t *testing.T
for i := 0; i <= b.N; i++ {
testRule(t, "imports-blacklist", &rule.ImportsBlacklistRule{}, &lint.RuleConfig{
Arguments: args,
})
}
}