Skip to content

Commit

Permalink
ci: Update golangci-lint config to latest (aws#6196)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored May 14, 2024
1 parent beb0b70 commit 0cbf3e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 9 additions & 11 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
run:
tests: true

timeout: 5m

skip-dirs:
- tools
- website
- hack
- charts
- designs

linters:
enable:
- asciicheck
Expand All @@ -31,12 +22,13 @@ linters:
- nilerr
disable:
- prealloc

linters-settings:
gocyclo:
min-complexity: 11
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
revive:
rules:
- name: dot-imports
Expand Down Expand Up @@ -66,6 +58,12 @@ linters-settings:
issues:
fix: true
exclude: ['declaration of "(err|ctx)" shadows declaration at']
exclude-dirs:
- tools
- website
- hack
- charts
- designs
exclude-rules:
- linters:
- goheader
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (p *DefaultProvider) Delete(ctx context.Context, id string) error {
if awserrors.IsNotFound(err) {
return cloudprovider.NewNodeClaimNotFoundError(fmt.Errorf("instance already terminated"))
}
if _, e := p.Get(ctx, id); err != nil {
if _, e := p.Get(ctx, id); e != nil {
if cloudprovider.IsNodeClaimNotFoundError(e) {
return e
}
Expand Down

0 comments on commit 0cbf3e0

Please sign in to comment.