Skip to content

Commit

Permalink
support golangci-lint 1.57.2 (#6754)
Browse files Browse the repository at this point in the history
- changes defaults to enabled
- update golangci-lint-action to v4 to avoid node deprecation warnings
  from action
  • Loading branch information
torcolvin authored and bbrks committed Apr 4, 2024
1 parent 535a869 commit a7b3f21
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
go-version: 1.21.8
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.55.2
version: v1.57.2
args: --config=.golangci-strict.yml

test:
Expand Down
15 changes: 15 additions & 0 deletions .golangci-strict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ linters-settings:
gocritic:
enabled-checks:
- ruleguard
disabled-checks:
- appendAssign
- assignOp
- badCond
- captLocal
- commentFormatting
- deprecatedComment
- elseif
- ifElseChain
- regexpMust
- singleCaseSwitch
- sloppyLen
- unlambda
- valSwap
- wrapperFunc
settings:
ruleguard:
rules: '${configDir}/ruleguard/*.go'
36 changes: 0 additions & 36 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,42 +65,6 @@ linters-settings:
- fieldalignment # detect Go structs that would take less memory if their fields were sorted
gocritic:
enabled-checks:
# start defaults
- appendAssign
- argOrder
- assignOp
- badCall
- badCond
- captLocal
- caseOrder
- codegenComment
- commentFormatting
- defaultCaseOrder
- deprecatedComment
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- elseif
- exitAfterDefer
- flagDeref
- flagName
- ifElseChain
- mapKey
- newDeref
- offBy1
- regexpMust
- singleCaseSwitch
- sloppyLen
- sloppyTypeAssert
- switchTrue
- typeSwitchVar
- underef
- unlambda
- unslice
- valSwap
- wrapperFunc
# end defaults
- ruleguard
settings:
ruleguard:
Expand Down

0 comments on commit a7b3f21

Please sign in to comment.