1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-17 20:57:58 +02:00

Allow import-blacklist to run against go test files (#862)

This commit is contained in:
Denis Voytyuk 2023-08-09 22:37:50 +02:00 committed by GitHub
parent df39256ea7
commit 4c84a170af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,10 +52,6 @@ func (r *ImportsBlacklistRule) Apply(file *lint.File, arguments lint.Arguments)
var failures []lint.Failure
if file.IsTest() {
return failures // skip, test file
}
for _, is := range file.AST.Imports {
path := is.Path
if path != nil && r.isBlacklisted(path.Value) {