Skip to content

Commit 4408aa4

Browse files
committed
fix: lint
1 parent 1cdea14 commit 4408aa4

File tree

2 files changed

+74
-59
lines changed

2 files changed

+74
-59
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
}
8484
8585
- name: Run golangci-lint
86-
uses: golangci/golangci-lint-action@v6
86+
uses: golangci/golangci-lint-action@v7
8787
with:
8888
version: latest
8989
skip-cache: true

.golangci.yml

Lines changed: 73 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,104 @@
1+
formatters:
2+
enable:
3+
- gofmt
4+
exclusions:
5+
paths:
6+
- .*_mock\.go
7+
- mock_.*\.go
8+
- .*/pkg/mod/.*$
9+
- .*/go/src/.*\.go
10+
- third_party$
11+
- builtin$
12+
- examples$
13+
settings:
14+
gofmt:
15+
simplify: true
16+
goimports:
17+
local-prefixes:
18+
- go.opentelemetry.io
119
issues:
2-
exclude-case-sensitive: false
3-
exclude-dirs-use-default: true
4-
exclude-files:
5-
- .*_mock\.go
6-
- mock_.*\.go
7-
- .*/pkg/mod/.*$
8-
- .*/go/src/.*\.go
9-
exclude-generated: strict
10-
exclude-use-default: true
1120
max-issues-per-linter: 50
1221
linters:
13-
disable-all: true
22+
default: none
1423
enable:
15-
- errcheck
16-
- goconst
17-
- gocyclo
18-
- gofmt
19-
- revive
20-
- govet
21-
- ineffassign
22-
- misspell
23-
- typecheck
24-
- unconvert
25-
- gosimple
26-
- staticcheck
27-
- unused
2824
- asciicheck
2925
- bodyclose
3026
- dogsled
3127
- durationcheck
28+
- errcheck
3229
- errorlint
3330
- exhaustive
3431
- forbidigo
3532
- forcetypeassert
33+
- goconst
3634
- gocritic
35+
- gocyclo
3736
- godot
3837
- gosec
38+
- govet
39+
- ineffassign
40+
- misspell
3941
- nestif
4042
- nilerr
4143
- nlreturn
4244
- noctx
4345
- prealloc
4446
- predeclared
47+
- revive
4548
- sqlclosecheck
49+
- staticcheck
50+
- unconvert
51+
- unused
4652
- whitespace
4753
- wrapcheck
4854
- wsl
49-
fast: false
50-
linters-settings:
51-
depguard:
52-
rules:
53-
main:
54-
allow:
55-
- $all
56-
dupl:
57-
threshold: 99
58-
errcheck:
59-
check-blank: false
60-
check-type-assertions: false
61-
goconst:
62-
min-len: 3
63-
min-occurrences: 2
64-
gocyclo:
65-
min-complexity: 18
66-
gofmt:
67-
simplify: true
68-
goimports:
69-
local-prefixes: go.opentelemetry.io
70-
govet:
71-
disable:
72-
- shadow
73-
misspell:
74-
ignore-words:
75-
- cancelled
76-
locale: US
77-
revive:
78-
ignore-generated-header: true
79-
severity: warning
55+
exclusions:
56+
paths:
57+
- .*_mock\.go
58+
- mock_.*\.go
59+
- .*/pkg/mod/.*$
60+
- .*/go/src/.*\.go
61+
- third_party$
62+
- builtin$
63+
- examples$
64+
presets:
65+
- comments
66+
- common-false-positives
67+
- legacy
68+
- std-error-handling
69+
settings:
70+
depguard:
71+
rules:
72+
main:
73+
allow:
74+
- $all
75+
dupl:
76+
threshold: 99
77+
errcheck:
78+
check-blank: false
79+
check-type-assertions: false
80+
goconst:
81+
min-len: 3
82+
min-occurrences: 2
83+
gocyclo:
84+
min-complexity: 18
85+
govet:
86+
disable:
87+
- shadow
88+
misspell:
89+
ignore-rules:
90+
- cancelled
91+
locale: US
92+
revive:
93+
severity: warning
8094
output:
8195
formats:
82-
- format: colored-line-number
83-
print-issued-lines: true
84-
print-linter-name: true
96+
text:
97+
path: stdout
98+
print-issued-lines: true
99+
print-linter-name: true
85100
run:
86101
concurrency: 4
87102
issues-exit-code: 1
88103
tests: false
89-
timeout: 1m
104+
version: "2"

0 commit comments

Comments
 (0)