Skip to content

Commit d8e3a6c

Browse files
committed
chore: update linter
1 parent 7082d00 commit d8e3a6c

File tree

3 files changed

+34
-52
lines changed

3 files changed

+34
-52
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
env:
1515
GO_VERSION: stable
16-
GOLANGCI_LINT_VERSION: v1.57.2
16+
GOLANGCI_LINT_VERSION: v1.63.4
1717
CGO_ENABLED: 0
1818

1919
steps:

.golangci.yml

+33-44
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
1-
run:
2-
timeout: 2m
1+
linters:
2+
enable-all: true
3+
disable:
4+
- exportloopref # deprecated
5+
- rowserrcheck # not relevant (SQL)
6+
- sqlclosecheck # not relevant (SQL)
7+
- cyclop # duplicate of gocyclo
8+
- dupl
9+
- exhaustive
10+
- exhaustruct
11+
- forbidigo
12+
- gochecknoglobals
13+
- gochecknoinits
14+
- err113
15+
- mnd
16+
- lll
17+
- nilnil
18+
- nlreturn
19+
- paralleltest
20+
- prealloc
21+
- testpackage
22+
- tparallel
23+
- varnamelen
24+
- wrapcheck
25+
- wsl
26+
- misspell
27+
- gosec # FIXME(ldez) must be fixed
28+
- errcheck # FIXME(ldez) must be fixed
29+
- nonamedreturns # FIXME(ldez) must be fixed
30+
- nakedret # FIXME(ldez) must be fixed
331

432
linters-settings:
533
govet:
@@ -51,48 +79,6 @@ linters-settings:
5179
- '^spew\.Print(f|ln)?$'
5280
- '^spew\.Dump$'
5381

54-
linters:
55-
enable-all: true
56-
disable:
57-
- deadcode # deprecated
58-
- exhaustivestruct # deprecated
59-
- golint # deprecated
60-
- ifshort # deprecated
61-
- interfacer # deprecated
62-
- maligned # deprecated
63-
- nosnakecase # deprecated
64-
- scopelint # deprecated
65-
- scopelint # deprecated
66-
- structcheck # deprecated
67-
- varcheck # deprecated
68-
- execinquery # not relevant (SQL)
69-
- rowserrcheck # not relevant (SQL)
70-
- sqlclosecheck # not relevant (SQL)
71-
- cyclop # duplicate of gocyclo
72-
- dupl
73-
- exhaustive
74-
- exhaustruct
75-
- forbidigo
76-
- gochecknoglobals
77-
- gochecknoinits
78-
- goerr113
79-
- gomnd
80-
- lll
81-
- nilnil
82-
- nlreturn
83-
- paralleltest
84-
- prealloc
85-
- testpackage
86-
- tparallel
87-
- varnamelen
88-
- wrapcheck
89-
- wsl
90-
- misspell
91-
- gosec # FIXME(ldez) must be fixed
92-
- errcheck # FIXME(ldez) must be fixed
93-
- nonamedreturns # FIXME(ldez) must be fixed
94-
- nakedret # FIXME(ldez) must be fixed
95-
9682
issues:
9783
exclude-use-default: false
9884
max-issues-per-linter: 0
@@ -105,3 +91,6 @@ issues:
10591
linters:
10692
- funlen
10793
- goconst
94+
95+
run:
96+
timeout: 2m

replace.go

-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ import (
1010
"text/scanner"
1111
)
1212

13-
func max(x, y int) int {
14-
if x > y {
15-
return x
16-
}
17-
return y
18-
}
19-
2013
func inArray(haystack []string, needle string) bool {
2114
return slices.ContainsFunc(haystack, func(word string) bool {
2215
return strings.EqualFold(needle, word)

0 commit comments

Comments
 (0)