Skip to content

Commit a958145

Browse files
committed
feat: Update golangci-lint version to 1.62.0 and go version to 1.23
Signed-off-by: Alexander Dahmen <[email protected]>
1 parent 4324f07 commit a958145

File tree

154 files changed

+209
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+209
-186
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on: [pull_request, workflow_dispatch]
44

55
env:
6-
GO_VERSION: "1.22"
6+
GO_VERSION: "1.23"
77

88
jobs:
99
main:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/stackitcloud/stackit-cli
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/fatih/color v1.18.0

golang-ci.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ linters-settings:
1414
# it's a comma-separated list of prefixes
1515
local-prefixes: github.com/freiheit-com/nmww
1616
depguard:
17-
list-type: blacklist
18-
include-go-root: false
19-
packages:
20-
- github.com/stretchr/testify
21-
packages-with-error-message:
22-
# specify an error message to output when a blacklisted package is used
23-
- github.com/stretchr/testify: "do not use a testing framework"
17+
rules:
18+
main:
19+
list-mode: lax # Everything is allowed unless it is denied
20+
deny:
21+
- pkg: "github.com/stretchr/testify"
22+
desc: Do not use a testing framework
2423
misspell:
2524
# Correct spellings using locale preferences for US or UK.
2625
# Default is to use a neutral variety of English.
@@ -75,7 +74,6 @@ linters:
7574
- unused
7675
# additional linters
7776
- errorlint
78-
- exportloopref
7977
- gochecknoinits
8078
- gocritic
8179
- gofmt
@@ -91,9 +89,6 @@ linters:
9189
- forcetypeassert
9290
- errcheck
9391
disable:
94-
- structcheck # deprecated
95-
- deadcode # deprecated
96-
- varcheck # deprecated
9792
- noctx # false positive: finds errors with http.NewRequest that dont make sense
9893
- unparam # false positives
9994
issues:

internal/cmd/auth/activate-service-account/activate_service_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5151
`Activate service account authentication in the STACKIT CLI using the service account token`,
5252
"$ stackit auth activate-service-account --service-account-token my-service-account-token"),
5353
),
54-
RunE: func(cmd *cobra.Command, args []string) error {
54+
RunE: func(cmd *cobra.Command, _ []string) error {
5555
model := parseInput(p, cmd)
5656

5757
tokenCustomEndpoint, err := storeFlags()

internal/cmd/auth/login/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
2424
`Login to the STACKIT CLI. This command will open a browser window where you can login to your STACKIT account`,
2525
"$ stackit auth login"),
2626
),
27-
RunE: func(cmd *cobra.Command, args []string) error {
27+
RunE: func(_ *cobra.Command, _ []string) error {
2828
err := auth.AuthorizeUser(p, false)
2929
if err != nil {
3030
return fmt.Errorf("authorization failed: %w", err)

internal/cmd/auth/logout/logout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
2222
`Log out of the STACKIT CLI.`,
2323
"$ stackit auth logout"),
2424
),
25-
RunE: func(cmd *cobra.Command, args []string) error {
25+
RunE: func(_ *cobra.Command, _ []string) error {
2626
err := auth.LogoutUser()
2727
if err != nil {
2828
return fmt.Errorf("log out failed: %w", err)

internal/cmd/beta/network-area/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
6363
`$ stackit beta network-area create --name network-area-3 --organization-id xxx --network-ranges "1.1.1.0/24,192.123.1.0/24" --transfer-network "192.160.0.0/24" --default-prefix-length 25 --max-prefix-length 29 --min-prefix-length 24`,
6464
),
6565
),
66-
RunE: func(cmd *cobra.Command, args []string) error {
66+
RunE: func(cmd *cobra.Command, _ []string) error {
6767
ctx := context.Background()
6868
model, err := parseInput(p, cmd)
6969
if err != nil {

internal/cmd/beta/network-area/list/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5252
"$ stackit beta network-area list --organization-id xxx --limit 10",
5353
),
5454
),
55-
RunE: func(cmd *cobra.Command, args []string) error {
55+
RunE: func(cmd *cobra.Command, _ []string) error {
5656
ctx := context.Background()
5757
model, err := parseInput(p, cmd)
5858
if err != nil {

internal/cmd/beta/network-area/network-range/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
4343
`$ stackit beta network-area network-range create --network-area-id xxx --organization-id yyy --network-range "1.1.1.0/24"`,
4444
),
4545
),
46-
RunE: func(cmd *cobra.Command, args []string) error {
46+
RunE: func(cmd *cobra.Command, _ []string) error {
4747
ctx := context.Background()
4848
model, err := parseInput(p, cmd)
4949
if err != nil {

internal/cmd/beta/network-area/network-range/list/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5353
"$ stackit beta network-area network-range list --network-area-id xxx --organization-id yyy --limit 10",
5454
),
5555
),
56-
RunE: func(cmd *cobra.Command, args []string) error {
56+
RunE: func(cmd *cobra.Command, _ []string) error {
5757
ctx := context.Background()
5858
model, err := parseInput(p, cmd)
5959
if err != nil {

0 commit comments

Comments
 (0)