Merge pull request #1829 from mmorel-35/golangci-lint@v2

[chore]: bump golangci-lint to v2.1.1
pull/1840/head
shirou 4 weeks ago committed by GitHub
commit 7d9af6fd99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -69,7 +69,7 @@ jobs:
with: with:
go-version-file: go.mod go-version-file: go.mod
- name: Setup golangci-lint - name: Setup golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with: with:
args: --verbose args: --verbose
version: latest version: latest

@ -1,20 +1,25 @@
version: "2"
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(github.com/shirou)
issues: issues:
max-same-issues: 0 max-same-issues: 0
exclude-rules: []
linters: linters:
enable: enable:
- asciicheck - asciicheck
- contextcheck - contextcheck
- durationcheck - durationcheck
- errorlint - errorlint
- gci
- gocritic - gocritic
- gofmt
- gofumpt
- goimports
- gomodguard - gomodguard
- gosec - gosec
- gosimple
- importas - importas
- misspell - misspell
- nakedret - nakedret
@ -24,7 +29,6 @@ linters:
- revive - revive
- testifylint - testifylint
- thelper - thelper
- typecheck
- unparam - unparam
- usetesting - usetesting
disable: disable:
@ -33,12 +37,7 @@ linters:
- ineffassign - ineffassign
- staticcheck - staticcheck
- unused - unused
linters-settings: settings:
gci:
sections:
- standard
- default
- prefix(github.com/shirou)
gocritic: gocritic:
disabled-checks: disabled-checks:
- captLocal - captLocal
@ -111,5 +110,15 @@ linters-settings:
usetesting: usetesting:
os-create-temp: false os-create-temp: false
os-mkdir-temp: false os-mkdir-temp: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
warn-unused: true
output:
show-stats: false
run: run:
timeout: 5m timeout: 5m

@ -554,7 +554,7 @@ func TestOpenFiles(t *testing.T) {
assert.NotEmpty(t, v) // test always open files. assert.NotEmpty(t, v) // test always open files.
for _, vv := range v { for _, vv := range v {
assert.NotEqual(t, "", vv.Path) assert.NotEmpty(t, vv.Path)
} }
} }

Loading…
Cancel
Save