mirror of
https://github.com/mgechev/revive.git
synced 2024-11-28 08:49:11 +02:00
02575a7674
* Add the imports-blacklist rule with tests * Add the imports-blacklist rule to README.md * Update the imports-blacklist rule to use map[string]bool so that we can have the algorithm in Visit below with O(n) instead of O(n*m) * Fix the imports-blacklist rule to be case sensitive
17 lines
308 B
Go
17 lines
308 B
Go
package test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/mgechev/revive/lint"
|
|
"github.com/mgechev/revive/rule"
|
|
)
|
|
|
|
func TestImportsBlacklist(t *testing.T) {
|
|
args := []interface{}{"crypto/md5", "crypto/sha1"}
|
|
|
|
testRule(t, "imports-blacklist", &rule.ImportsBlacklistRule{}, &lint.RuleConfig{
|
|
Arguments: args,
|
|
})
|
|
}
|