Skip to content

Commit acb993c

Browse files
committed
chore: fine-tune golangci-lint settings for improved metrics on this project
1 parent 6622309 commit acb993c

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

scripts/golangci.refactor-metrics.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,28 @@ linters:
4242
- unused
4343
settings:
4444
cyclop:
45-
max-complexity: 15
46-
package-average: 12.0
45+
max-complexity: 10
46+
package-average: 8.0
4747
errcheck:
4848
check-type-assertions: true
4949
errorlint:
5050
comparison: true
5151
asserts: true
5252
funlen:
53-
lines: 100
54-
statements: 60
53+
lines: 60
54+
statements: 40
5555
gocognit:
56-
min-complexity: 30
56+
min-complexity: 10
5757
goconst:
5858
min-len: 3
5959
min-occurrences: 4
6060
match-constant: true
6161
maintidx:
62-
under: 40
62+
under: 45
6363
nakedret:
6464
max-func-lines: 40
6565
nestif:
66-
min-complexity: 6
66+
min-complexity: 5
6767
unparam:
6868
check-exported: false
6969
exclusions:
@@ -74,6 +74,8 @@ linters:
7474
- path: _test\.go
7575
linters:
7676
- errcheck
77+
- funlen
78+
- maintidx
7779
- noctx
7880
- unparam
7981

0 commit comments

Comments
 (0)