mirror of
https://github.com/mgechev/revive.git
synced 2025-11-29 22:28:23 +02:00
refactor: replace failure Category raw string with constant (#1196)
* refactor: replace Category raw strings with constants * Add type FailureCategory; add comments for constants
This commit is contained in:
@@ -50,7 +50,7 @@ func (w lintFmtErrorf) Visit(n ast.Node) ast.Visitor {
|
||||
|
||||
// the call is of the form fmt.Errorf("...")
|
||||
w.onFailure(lint.Failure{
|
||||
Category: "errors",
|
||||
Category: lint.FailureCategoryErrors,
|
||||
Node: n,
|
||||
Confidence: 1,
|
||||
Failure: "replace fmt.Errorf by errors.New",
|
||||
|
||||
Reference in New Issue
Block a user