Skip to content

Commit

Permalink
Enable the revive linter and fix a single finding
Browse files Browse the repository at this point in the history
  • Loading branch information
nunnatsa committed Jun 27, 2023
1 parent 716199e commit afbbe92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linters:
enable:
- revive
9 changes: 5 additions & 4 deletions gomegahandler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ func (h dotHandler) GetActualFuncName(expr *ast.CallExpr) (string, bool) {
case *ast.SelectorExpr:
if isGomegaVar(actualFunc.X, h) {
return actualFunc.Sel.Name, true
} else {
if x, ok := actualFunc.X.(*ast.CallExpr); ok {
return h.GetActualFuncName(x)
}
}

if x, ok := actualFunc.X.(*ast.CallExpr); ok {
return h.GetActualFuncName(x)
}

case *ast.CallExpr:
return h.GetActualFuncName(actualFunc)
}
Expand Down

0 comments on commit afbbe92

Please sign in to comment.