Skip to content

Commit

Permalink
Update golangci-lint config to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed May 14, 2024
1 parent 2ace691 commit 28da60c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 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
2 changes: 1 addition & 1 deletion pkg/providers/subnet/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
type Provider interface {
LivenessProbe(*http.Request) error
List(context.Context, *v1beta1.EC2NodeClass) ([]*ec2.Subnet, error)
AssociatePublicIPAddressValue( *v1beta1.EC2NodeClass) (*bool)
AssociatePublicIPAddressValue(*v1beta1.EC2NodeClass) *bool
ZonalSubnetsForLaunch(context.Context, *v1beta1.EC2NodeClass, []*cloudprovider.InstanceType, string) (map[string]*Subnet, error)
UpdateInflightIPs(*ec2.CreateFleetInput, *ec2.CreateFleetOutput, []*cloudprovider.InstanceType, []*Subnet, string)
}
Expand Down

0 comments on commit 28da60c

Please sign in to comment.