mirror of
https://github.com/mgechev/revive.git
synced 2025-01-06 03:04:06 +02:00
fix(var-naming): set node to package name for underscore in package name (#689)
Setting the entire file AST as the node causes golangci-lint to print the entire file source as the context, and line and column numbers set to 1. Point to the package name node instead. Closes #688
This commit is contained in:
parent
e10678fea5
commit
4daa573afe
@ -56,7 +56,7 @@ func (r *VarNamingRule) Apply(file *lint.File, arguments lint.Arguments) []lint.
|
||||
walker.onFailure(lint.Failure{
|
||||
Failure: "don't use an underscore in package name",
|
||||
Confidence: 1,
|
||||
Node: walker.fileAst,
|
||||
Node: walker.fileAst.Name,
|
||||
Category: "naming",
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user