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

@@ -100,7 +100,7 @@ func (w *lintUnconditionalRecursionRule) Visit(node ast.Node) ast.Visitor {
!w.currentFunc.seenConditionalExit && // there is a conditional exit in the function
w.currentFunc.funcDesc.equal(&funcDesc{selector, funcID}) {
w.onFailure(lint.Failure{
Category: "logic",
Category: lint.FailureCategoryLogic,
Confidence: 0.8,
Node: n,
Failure: "unconditional recursive call",