Skip to content

Commit ca0678c

Browse files
authored
fix: dot-imports does not check test files (#884)
1 parent 883c4cc commit ca0678c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rule/dot-imports.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ type lintImports struct {
3939
}
4040

4141
func (w lintImports) Visit(_ ast.Node) ast.Visitor {
42-
for i, is := range w.fileAst.Imports {
43-
_ = i
44-
if is.Name != nil && is.Name.Name == "." && !w.file.IsTest() {
42+
for _, is := range w.fileAst.Imports {
43+
if is.Name != nil && is.Name.Name == "." {
4544
w.onFailure(lint.Failure{
4645
Confidence: 1,
4746
Failure: "should not use dot imports",

0 commit comments

Comments
 (0)