Skip to content

Commit

Permalink
Enable all gocritic checks (#83)
Browse files Browse the repository at this point in the history
...except whyNoLint. I tried adding explanations to a few nolints, but
gocritic didn't recognize that an explanation had been added. It kept
complaining.
  • Loading branch information
ryboe committed Nov 9, 2020
1 parent d61c3c9 commit 42aa8c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .golangci.yml
Expand Up @@ -13,6 +13,14 @@ linters:
- wsl

linters-settings:
gocritic:
enabled-tags:
- diagnostic
- opinionated
- performance
- style
disabled-checks:
- whyNoLint
gocyclo:
min-complexity: 11
gofmt:
Expand Down
2 changes: 1 addition & 1 deletion args.go
Expand Up @@ -60,7 +60,7 @@ func argNames(filename string, line int) ([]string, error) {
}

var names []string
ast.Inspect(f, func(n ast.Node) bool { // nolint: unparam
ast.Inspect(f, func(n ast.Node) bool {
call, is := n.(*ast.CallExpr)
if !is {
// The node is not a function call.
Expand Down

0 comments on commit 42aa8c4

Please sign in to comment.