Skip to content

Commit

Permalink
chore: Enable gocritic with initial set of rules (#13247)
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-pawel authored and pull[bot] committed Sep 5, 2023
1 parent 635b170 commit d391e69
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ linters:
- errorlint
- exportloopref
- gocheckcompilerdirectives
- gocritic
- goprintffuncname
- gosec
- gosimple
Expand Down Expand Up @@ -83,6 +84,33 @@ linters-settings:
- "(*hash/maphash.Hash).Write"
- "(*hash/maphash.Hash).WriteByte"
- "(*hash/maphash.Hash).WriteString"
gocritic:
# Which checks should be enabled; can't be combined with 'disabled-checks'.
# See https://go-critic.github.io/overview#checks-overview.
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`.
# By default, list of stable checks is used.
enabled-checks:
- argOrder
- badCall
- badCond
- badLock
- badSorting
- builtinShadowDecl
- caseOrder
- codegenComment
- dupBranchBody
- dupCase
- dupSubExpr
- emptyDecl
- evalOrder
- externalErrorReassign
- nilValReturn
- regexpPattern
- sloppyTypeAssert
- sortSlice
- sqlQuery
- uncheckedInlineErr
- weakCond
gosec:
# To select a subset of rules to run.
# Available rules: https://github.com/securego/gosec#available-rules
Expand Down

0 comments on commit d391e69

Please sign in to comment.