1
0
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:
Oleksandr Redko
2025-01-18 13:16:19 +02:00
committed by GitHub
parent 57fe5b63d4
commit 395f7902d3
63 changed files with 151 additions and 107 deletions

View File

@@ -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",