Skip to content

Commit ed58931

Browse files
authored
ci: upgrade golangci-lint to v2.1.5 (#50)
1 parent b0b504f commit ed58931

File tree

3 files changed

+34
-20
lines changed

3 files changed

+34
-20
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: golangci-lint
33
on:
44
push:
55
branches:
6-
- main
6+
- '**'
77
pull_request:
88

99
permissions:
@@ -27,6 +27,6 @@ jobs:
2727
go-version: ${{ env.GO_VERSION }}
2828

2929
- name: Run golangci-lint
30-
uses: golangci/golangci-lint-action@v6
30+
uses: golangci/golangci-lint-action@v7
3131
with:
32-
version: v1.62.2
32+
version: v2.1.5

.golangci.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1+
version: "2"
12
run:
2-
timeout: 1m
3-
3+
timeout: 2m
44
linters:
5-
disable-all: true
5+
default: none
66
enable:
77
- dupl
88
- errcheck
99
- errname
1010
- errorlint
1111
- funlen
12-
- gci
1312
- goconst
1413
- gocritic
1514
- gocyclo
16-
- gofmt
17-
- goimports
1815
- gosec
19-
- gosimple
2016
- govet
2117
- ineffassign
2218
- lll
@@ -25,18 +21,36 @@ linters:
2521
- prealloc
2622
- revive
2723
- staticcheck
28-
- stylecheck
2924
- thelper
3025
- tparallel
31-
- typecheck
3226
- unconvert
3327
- unparam
3428
- unused
3529
- whitespace
36-
37-
issues:
38-
exclude-rules:
39-
- path: _test\.go
40-
linters:
41-
- unparam
42-
- funlen
30+
exclusions:
31+
generated: lax
32+
presets:
33+
- comments
34+
- common-false-positives
35+
- legacy
36+
- std-error-handling
37+
rules:
38+
- linters:
39+
- funlen
40+
- unparam
41+
path: _test\.go
42+
paths:
43+
- third_party$
44+
- builtin$
45+
- examples$
46+
formatters:
47+
enable:
48+
- gci
49+
- gofmt
50+
- goimports
51+
exclusions:
52+
generated: lax
53+
paths:
54+
- third_party$
55+
- builtin$
56+
- examples$

internal/terminal/spinner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (s *Spinner) Start() {
6262
}()
6363
}
6464

65-
//nolint:errcheck
65+
//nolint:errcheck,staticcheck
6666
func (s *Spinner) Clear() {
6767
s.writer.WriteString(fmt.Sprintf(moveCursorBackward, s.length))
6868
s.writer.WriteString(clearLineFromCursor)

0 commit comments

Comments
 (0)