Skip to content

Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
164 changes: 103 additions & 61 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,109 @@
run:
timeout: 5m

version: "2"
linters:
disable-all: true
default: none
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- dupword
- durationcheck
- errcheck
- errchkjson
- errorlint
- exhaustive
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- godot
- godox
- gosec
- gosmopolitan
- govet
- ineffassign
- loggercheck
- makezero
- misspell
- unused
- typecheck
- staticcheck
- musttag
- nilerr
- nilnesserr
- noctx
- protogetter
- reassign
- recvcheck
- revive
- gofmt
- gocritic

presets:
- bugs
- comment
- rowserrcheck
- spancheck
- sqlclosecheck
- staticcheck
- testifylint
- unparam
- unused
- metalinter

issues:
include:
- EXC0012
- EXC0014

linters-settings:
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: argument-limit
severity: warning
disabled: false
arguments: [ 6 ]
- name: confusing-naming
disabled: true
- name: confusing-results
disabled: true
- name: cyclomatic
disabled: true
arguments: [ 7 ]
- name: file-header
disabled: true
- name: line-length-limit
severity: warning
disabled: true
arguments: [ 80 ]
- name: function-length
disabled: true
- name: cognitive-complexity
disabled: true
- name: max-public-structs
disabled: true
- name: banned-characters
disabled: true
- name: function-result-limit
severity: warning
disabled: false
arguments: [ 3 ]
- name: flag-parameter
disabled: true
wsl:
allow-cuddle-declarations: true
force-short-decl-cuddling: true
force-err-cuddling: true
- zerologlint
settings:
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: argument-limit
arguments:
- 6
severity: warning
disabled: false
- name: confusing-naming
disabled: true
- name: confusing-results
disabled: true
- name: cyclomatic
arguments:
- 7
disabled: true
- name: file-header
disabled: true
- name: line-length-limit
arguments:
- 80
severity: warning
disabled: true
- name: function-length
disabled: true
- name: cognitive-complexity
disabled: true
- name: max-public-structs
disabled: true
- name: banned-characters
disabled: true
- name: function-result-limit
arguments:
- 3
severity: warning
disabled: false
- name: flag-parameter
disabled: true
- name: package-comments
disabled: true
wsl:
allow-cuddle-declarations: true
force-err-cuddling: true
force-short-decl-cuddling: true
exclusions:
generated: lax
presets:
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
6 changes: 3 additions & 3 deletions pkg/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestNilValidate(t *testing.T) {
assert.Nil(t, i.Value)
assert.True(t, strings.HasSuffix(i.Error, "_unsigned"))
}
assert.Equal(t, "", response.Response.SystemError)
assert.Empty(t, response.Response.SystemError)
}

func TestVerifyOk(t *testing.T) {
Expand All @@ -168,7 +168,7 @@ func TestVerifyOk(t *testing.T) {
assert.Len(t, response.Response.Items, 1)
assert.Equal(t, validImageName, response.Response.Items[0].Key)
assert.NotNil(t, response.Response.Items[0].Value)
assert.Equal(t, "", response.Response.SystemError)
assert.Empty(t, response.Response.SystemError)
assert.Empty(t, response.Response.Items[0].Error)
}

Expand Down Expand Up @@ -196,7 +196,7 @@ func TestVerifyWrongDomain(t *testing.T) {
assert.Nil(t, response.Response.Items[0].Value)
assert.Equal(t, validImageName, response.Response.Items[0].Key)
assert.True(t, strings.HasSuffix(response.Response.Items[0].Error, "_unsigned"))
assert.Equal(t, "", response.Response.SystemError)
assert.Empty(t, response.Response.SystemError)
}

func TestInvalid(t *testing.T) {
Expand Down
Loading