Skip to content

Commit 6d5fc7b

Browse files
authored
Merge pull request #16 from TotallyNotRobots/bump-golang-ci-lint-action
Bump-golang-ci-lint-action
2 parents 529adb3 + ae14674 commit 6d5fc7b

File tree

4 files changed

+52
-41
lines changed

4 files changed

+52
-41
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
run: make test
2727

2828
- name: golangci-lint
29-
uses: golangci/golangci-lint-action@v6
29+
uses: golangci/golangci-lint-action@v7
3030
with:
3131
version: latest

.golangci.yml

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
1+
version: "2"
12
linters:
2-
disable-all: true
3+
default: none
34
enable:
45
- asciicheck
56
- bidichk
67
- bodyclose
78
- containedctx
89
- contextcheck
9-
# - cyclop
10+
- copyloopvar
1011
- decorder
11-
# - dogsled
12-
# - dupl
1312
- durationcheck
13+
- err113
1414
- errcheck
1515
- errchkjson
1616
- errname
1717
- errorlint
1818
- exhaustive
19-
- copyloopvar
2019
- forbidigo
2120
- forcetypeassert
22-
- gci
2321
- gochecknoglobals
2422
- gochecknoinits
25-
# - gocognit
2623
- goconst
2724
- gocritic
2825
- gocyclo
2926
- godot
30-
- err113
31-
- gofmt
32-
- gofumpt
3327
- goheader
34-
- goimports
35-
- mnd
3628
- gomodguard
3729
- gosec
38-
- gosimple
3930
- gosmopolitan
4031
- govet
4132
- importas
@@ -46,6 +37,7 @@ linters:
4637
- makezero
4738
- mirror
4839
- misspell
40+
- mnd
4941
- musttag
5042
- nakedret
5143
- nestif
@@ -63,41 +55,60 @@ linters:
6355
- rowserrcheck
6456
- sqlclosecheck
6557
- staticcheck
66-
- stylecheck
6758
- tagalign
6859
- tagliatelle
6960
- testpackage
7061
- thelper
7162
- tparallel
72-
- typecheck
7363
- unconvert
7464
- unparam
7565
- unused
7666
- usestdlibvars
77-
# - varnamelen
7867
- wastedassign
7968
- whitespace
8069
- wrapcheck
8170
- wsl
82-
83-
linters-settings:
84-
varnamelen:
85-
min-name-length: 2
86-
ignore-decls:
87-
- l *zap.Logger
88-
- l *slog.Logger
89-
- l slog.Logger
90-
- w http.ResponseWriter
91-
- r chi.Router
92-
- fs *flag.FlagSet
93-
- r *http.Request
94-
- eg *errgroup.Group
95-
- sw *statuswriter.StatusWriter
96-
- db *bun.DB
97-
gocritic:
98-
enabled-tags:
99-
- diagnostic
100-
- style
101-
- performance
102-
- experimental
103-
- opinionated
71+
settings:
72+
gocritic:
73+
enabled-tags:
74+
- diagnostic
75+
- style
76+
- performance
77+
- experimental
78+
- opinionated
79+
varnamelen:
80+
min-name-length: 2
81+
ignore-decls:
82+
- l *zap.Logger
83+
- l *slog.Logger
84+
- l slog.Logger
85+
- w http.ResponseWriter
86+
- r chi.Router
87+
- fs *flag.FlagSet
88+
- r *http.Request
89+
- eg *errgroup.Group
90+
- sw *statuswriter.StatusWriter
91+
- db *bun.DB
92+
exclusions:
93+
generated: lax
94+
presets:
95+
- comments
96+
- common-false-positives
97+
- legacy
98+
- std-error-handling
99+
paths:
100+
- third_party$
101+
- builtin$
102+
- examples$
103+
formatters:
104+
enable:
105+
- gci
106+
- gofmt
107+
- gofumpt
108+
- goimports
109+
exclusions:
110+
generated: lax
111+
paths:
112+
- third_party$
113+
- builtin$
114+
- examples$

cmd/healthcheck.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func newHealthcheckCmd(cfg *config.Config) *ff.Command {
4444

4545
// Check the response
4646
if resp.StatusCode != http.StatusOK {
47-
return fmt.Errorf("server returned status %d", resp.StatusCode) //nolint:goerr113 // We want to return an error
47+
return fmt.Errorf("server returned status %d", resp.StatusCode) //nolint:err113 // We want to return an error
4848
}
4949

5050
return nil

internal/middleware/wrapper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestResponseWrapper_Status(t *testing.T) {
4040
type FailWriter struct{}
4141

4242
func (w *FailWriter) Write(_ []byte) (int, error) {
43-
return 0, fmt.Errorf("error") //nolint:goerr113 // We want to return an error
43+
return 0, fmt.Errorf("error") //nolint:err113 // We want to return an error
4444
}
4545

4646
func (w *FailWriter) Header() http.Header {

0 commit comments

Comments
 (0)