1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-15 01:04:40 +02:00

Lint cleanup (#679)

This commit is contained in:
chavacava
2022-04-10 11:55:13 +02:00
committed by GitHub
parent 31fbdb1833
commit 04728cf0de
83 changed files with 203 additions and 233 deletions

View File

@ -44,13 +44,13 @@ func (r *CognitiveComplexityRule) Apply(file *lint.File, arguments lint.Argument
},
}
linter.lint()
linter.lintCognitiveComplexity()
return failures
}
// Name returns the rule name.
func (r *CognitiveComplexityRule) Name() string {
func (*CognitiveComplexityRule) Name() string {
return "cognitive-complexity"
}
@ -60,7 +60,7 @@ type cognitiveComplexityLinter struct {
onFailure func(lint.Failure)
}
func (w cognitiveComplexityLinter) lint() {
func (w cognitiveComplexityLinter) lintCognitiveComplexity() {
f := w.file
for _, decl := range f.AST.Decls {
if fn, ok := decl.(*ast.FuncDecl); ok && fn.Body != nil {