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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user