Skip to content

Commit

Permalink
fix: dot-imports now checks test files as well
Browse files Browse the repository at this point in the history
  • Loading branch information
denisvmedia committed Aug 29, 2023
1 parent 883c4cc commit e87a06b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rule/dot-imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ type lintImports struct {
}

func (w lintImports) Visit(_ ast.Node) ast.Visitor {
for i, is := range w.fileAst.Imports {
_ = i
if is.Name != nil && is.Name.Name == "." && !w.file.IsTest() {
for _, is := range w.fileAst.Imports {
if is.Name != nil && is.Name.Name == "." {
w.onFailure(lint.Failure{
Confidence: 1,
Failure: "should not use dot imports",
Expand Down

0 comments on commit e87a06b

Please sign in to comment.