Skip to content

Commit 17f15a2

Browse files
authored
Merge pull request #54 from gotd/dependabot/github_actions/golangci/golangci-lint-action-7.0.0
build(deps): bump golangci/golangci-lint-action from 6.5.2 to 7.0.0
2 parents b516883 + 5629183 commit 17f15a2

File tree

2 files changed

+82
-71
lines changed

2 files changed

+82
-71
lines changed

.github/workflows/pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v4
3030
- name: lint
31-
uses: golangci/golangci-lint-action@v6.5.2
31+
uses: golangci/golangci-lint-action@v7.0.0
3232
with:
3333
version: latest
3434

.golangci.yml

+81-70
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,101 @@
1-
linters-settings:
2-
gocyclo:
3-
min-complexity: 15
4-
dupl:
5-
threshold: 100
6-
goconst:
7-
min-len: 2
8-
min-occurrences: 3
9-
misspell:
10-
locale: US
11-
lll:
12-
line-length: 140
13-
goimports:
14-
local-prefixes: github.com/gotd/tl
15-
gocritic:
16-
enabled-tags:
17-
- diagnostic
18-
- experimental
19-
- opinionated
20-
- performance
21-
- style
22-
disabled-checks:
23-
- hugeParam
24-
- rangeValCopy
25-
- exitAfterDefer
26-
- whyNoLint
27-
- singleCaseSwitch
28-
1+
version: "2"
292
linters:
30-
disable-all: true
3+
default: none
314
enable:
325
- dogsled
336
- dupl
347
- errcheck
8+
- gochecknoglobals
359
- gochecknoinits
10+
- gocognit
3611
- goconst
3712
- gocritic
3813
- gocyclo
39-
- gofmt
40-
- goimports
4114
- gosec
42-
- gosimple
4315
- govet
4416
- ineffassign
4517
- lll
4618
- misspell
4719
- nakedret
4820
- staticcheck
49-
- stylecheck
50-
- typecheck
5121
- unconvert
5222
- unparam
5323
- unused
5424
- whitespace
55-
- gochecknoglobals
56-
- gocognit
57-
58-
# Do not enable:
59-
# - wsl (too opinionated about newlines)
60-
# - godox (todos are OK)
61-
# - bodyclose (false positives on helper functions)
62-
# - prealloc (not worth it in scope of this project)
63-
# - maligned (same as prealloc)
64-
# - funlen (gocyclo is enough)
65-
66-
issues:
67-
exclude-rules:
68-
# TODO(ernado): Should we refactor Parse() functions?
69-
- linters: [gocyclo, gocognit]
70-
text: "Parse"
71-
72-
# Disable linters that are annoying in tests.
73-
- path: _test\.go
74-
linters:
75-
- gocyclo
76-
- errcheck
77-
- dupl
78-
- gosec
79-
- funlen
80-
- goconst
81-
- gocognit
82-
- scopelint
83-
- lll
84-
- gochecknoglobals
85-
# Ignore shadowing of err.
86-
- linters: [govet]
87-
text: 'declaration of "err"'
88-
# Ignore linters in main packages.
89-
- path: main\.go
90-
linters: [gochecknoglobals, goconst, funlen, gocognit, gocyclo]
25+
settings:
26+
dupl:
27+
threshold: 100
28+
goconst:
29+
min-len: 2
30+
min-occurrences: 3
31+
gocritic:
32+
disabled-checks:
33+
- hugeParam
34+
- rangeValCopy
35+
- exitAfterDefer
36+
- whyNoLint
37+
- singleCaseSwitch
38+
enabled-tags:
39+
- diagnostic
40+
- experimental
41+
- opinionated
42+
- performance
43+
- style
44+
gocyclo:
45+
min-complexity: 15
46+
lll:
47+
line-length: 140
48+
misspell:
49+
locale: US
50+
exclusions:
51+
generated: lax
52+
presets:
53+
- comments
54+
- common-false-positives
55+
- legacy
56+
- std-error-handling
57+
rules:
58+
- linters:
59+
- gocognit
60+
- gocyclo
61+
text: Parse
62+
- linters:
63+
- dupl
64+
- errcheck
65+
- funlen
66+
- gochecknoglobals
67+
- gocognit
68+
- goconst
69+
- gocyclo
70+
- gosec
71+
- lll
72+
- scopelint
73+
path: _test\.go
74+
- linters:
75+
- govet
76+
text: declaration of "err"
77+
- linters:
78+
- funlen
79+
- gochecknoglobals
80+
- gocognit
81+
- goconst
82+
- gocyclo
83+
path: main\.go
84+
paths:
85+
- third_party$
86+
- builtin$
87+
- examples$
88+
formatters:
89+
enable:
90+
- gofmt
91+
- goimports
92+
settings:
93+
goimports:
94+
local-prefixes:
95+
- github.com/gotd/tl
96+
exclusions:
97+
generated: lax
98+
paths:
99+
- third_party$
100+
- builtin$
101+
- examples$

0 commit comments

Comments
 (0)