1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-27 22:18:41 +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

@@ -113,7 +113,7 @@ func (w *lintUnhandledErrors) addFailure(n *ast.CallExpr) {
}
w.onFailure(lint.Failure{
Category: "bad practice",
Category: lint.FailureCategoryBadPractice,
Confidence: 1,
Node: n,
Failure: fmt.Sprintf("Unhandled error in call to function %v", name),