Skip to content

Commit 0354790

Browse files
chore(deps): bump golangci/golangci-lint-action from 4.0.0 to 8.0.0 (#441)
1 parent bffffed commit 0354790

14 files changed

Lines changed: 54 additions & 34 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
with:
2121
go-version-file: 'go.mod'
2222
- name: Run golangci-lint-action
23-
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
23+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
2424
with:
2525
args: --timeout=2m

.golangci.yaml

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# Golang CI pipeline configuration
1+
version: "2"
22
linters:
3-
disable-all: true
4-
5-
# Run golangci-lint linters to see the list of all linters
6-
# Please keep them sorted alphabetically
3+
default: none
74
enable:
85
- asasalint
96
- asciicheck
@@ -14,12 +11,9 @@ linters:
1411
- errcheck
1512
- goconst
1613
- gocritic
17-
- gofumpt
18-
- goimports
1914
- gomoddirectives
2015
- goprintffuncname
2116
- gosec
22-
- gosimple
2317
- govet
2418
- ineffassign
2519
- makezero
@@ -32,24 +26,47 @@ linters:
3226
- revive
3327
- rowserrcheck
3428
- staticcheck
35-
- stylecheck
36-
- tenv
37-
- typecheck
3829
- unconvert
3930
- unused
4031
- wastedassign
4132
- whitespace
42-
33+
settings:
34+
goconst:
35+
min-len: 5
36+
revive:
37+
rules:
38+
- name: var-naming
39+
arguments:
40+
- []
41+
- []
42+
- - skip-package-name-checks: true
43+
exclusions:
44+
generated: lax
45+
presets:
46+
- comments
47+
- common-false-positives
48+
- legacy
49+
- std-error-handling
50+
rules:
51+
- linters:
52+
- bodyclose
53+
- funlen
54+
path: _test\.go
55+
paths:
56+
- third_party$
57+
- builtin$
58+
- examples$
4359
issues:
4460
max-issues-per-linter: 0
4561
max-same-issues: 0
4662
uniq-by-line: false
47-
exclude-rules:
48-
- path: _test\.go
49-
linters:
50-
- funlen
51-
- bodyclose
52-
53-
linters-settings:
54-
goconst:
55-
min-len: 5
63+
formatters:
64+
enable:
65+
- gofumpt
66+
- goimports
67+
exclusions:
68+
generated: lax
69+
paths:
70+
- third_party$
71+
- builtin$
72+
- examples$

internal/commands/gateway/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type listCommand struct {
2727

2828
func (c *listCommand) InitCommand() {
2929
fs := &pflag.FlagSet{}
30-
c.PageParameters.ConfigureFlags(fs)
30+
c.ConfigureFlags(fs)
3131
c.AddFlags(fs)
3232
}
3333

internal/commands/network/show.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (s *showCommand) InitCommand() {
3939

4040
// Execute implements commands.MultipleArgumentCommand
4141
func (s *showCommand) Execute(exec commands.Executor, arg string) (output.Output, error) {
42-
network, err := s.CachingNetwork.GetCached(arg)
42+
network, err := s.GetCached(arg)
4343
if err != nil {
4444
return nil, err
4545
}

internal/commands/router/show.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (s *showCommand) InitCommand() {
3737

3838
// Execute implements commands.MultipleArgumentCommand
3939
func (s *showCommand) Execute(exec commands.Executor, arg string) (output.Output, error) {
40-
router, err := s.CachingRouter.GetCached(arg)
40+
router, err := s.GetCached(arg)
4141
if err != nil {
4242
return nil, err
4343
}

internal/commands/server/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (s *createParams) processParams(exec commands.Executor) error {
9898

9999
// Enable metadata service for cloud-init templates. Leave empty for other templates to use value defined by user.
100100
if osStorage.TemplateType == upcloud.StorageTemplateTypeCloudInit {
101-
s.CreateServerRequest.Metadata = upcloud.True
101+
s.Metadata = upcloud.True
102102
}
103103

104104
s.StorageDevices = append(s.StorageDevices, request.CreateServerStorageDevice{

internal/commands/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const (
2424
simpleBackupDescription = "Simple backup rule in `HHMM,{daily,dailies,weeklies,monthlies}` format or `no`. For example: `2300,dailies`."
2525
)
2626

27-
// BaseServerCommand crestes the base "server" command
27+
// BaseServerCommand creates the base "server" command
2828
func BaseServerCommand() commands.Command {
2929
return &serverCommand{
3030
commands.New("server", "Manage servers"),

internal/commands/zone/devices/devices.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
// DevicesCommand creates the "zone devices" command
10-
func DevicesCommand() commands.Command { //nolint:revive // Does not make sense to add Base prefix here to avoid stuttering warning
10+
func DevicesCommand() commands.Command {
1111
return &devicesCommand{
1212
BaseCommand: commands.New("devices", "List available devices for each zone", "upctl zone devices"),
1313
}

internal/mock/mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//nolint:nilnil,revive // Here nil, nil returns and unused parameters are used in not-implemented methods required to satisfy an interface and it does not make sense to rename them when copying functions from our SDK
1+
//nolint:nilnil // Here nil, nil returns and unused parameters are used in not-implemented methods required to satisfy an interface and it does not make sense to rename them when copying functions from our SDK
22
package mock
33

44
import (

internal/resolver/kubernetes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ func (s *CachingKubernetes) Get(ctx context.Context, svc service.AllServices) (R
4343

4444
// PositionalArgumentHelp implements resolver.ResolutionProvider
4545
func (s CachingKubernetes) PositionalArgumentHelp() string {
46-
return "<UUID/Name...>" //nolint:goconst
46+
return helpUUIDName
4747
}

0 commit comments

Comments
 (0)