Skip to content

Commit

Permalink
Merge pull request #6 from maratori/report-column
Browse files Browse the repository at this point in the history
Report position of package name instead of package keyword
  • Loading branch information
maratori committed Nov 4, 2019
2 parents 6928564 + 482d12e commit 8b14ce4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/testpackage/testpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
if strings.HasSuffix(fileName, "_test.go") {
packageName := f.Name.Name
if !strings.HasSuffix(packageName, "_test") {
pass.Reportf(f.Pos(), `package should be "%s_test" instead of "%s"`, packageName, packageName)
pass.Reportf(f.Name.Pos(), `package should be "%s_test" instead of "%s"`, packageName, packageName)
}
}
}
Expand Down

0 comments on commit 8b14ce4

Please sign in to comment.