Skip to content

Commit

Permalink
fix: rename rule
Browse files Browse the repository at this point in the history
  • Loading branch information
damif94 committed Jul 30, 2023
1 parent d6a9894 commit cf4b209
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rule/redundant-import-alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (*RedundantImportAlias) Apply(file *lint.File, _ lint.Arguments) []lint.Fai
if getImportPackageName(imp) == imp.Name.Name {
failures = append(failures, lint.Failure{
Confidence: 1,
Failure: fmt.Sprintf("Import alias \"%s\" is not used", imp.Name.Name),
Failure: fmt.Sprintf("Import alias \"%s\" is redundant", imp.Name.Name),
Node: imp,
Category: "imports",
})
Expand Down
4 changes: 2 additions & 2 deletions testdata/redundant-import-alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import(
"strings"
_ "crypto/md5"
str "strings"
strings "strings" // MATCH /Import alias "strings" is not used/
strings "strings" // MATCH /Import alias "strings" is redundant/
crypto "crypto/md5"
md5 "crypto/md5" // MATCH /Import alias "md5" is not used/
md5 "crypto/md5" // MATCH /Import alias "md5" is redundant/
)

0 comments on commit cf4b209

Please # to comment.