Skip to content

Commit 7de236b

Browse files
committed
chore: remove forced version 1.64 for lint
1 parent fedde8c commit 7de236b

File tree

2 files changed

+28
-126
lines changed

2 files changed

+28
-126
lines changed

.github/workflows/test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ jobs:
2828
- uses: ./.github/actions/setup-build-env
2929
- name: Lint library
3030
uses: golangci/golangci-lint-action@v7
31-
with:
32-
version: v1.64

.golangci.yaml

Lines changed: 28 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,63 @@
1+
version: "2"
2+
13
run:
24
timeout: 10m
35
issues-exit-code: 1
46
tests: false
57

68
linters:
7-
# please, do not use `enable-all`: it's deprecated and will be removed soon.
8-
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
9-
disable-all: true
109
enable:
1110
- bodyclose
12-
# - depguard # We don't want to use this anymore
1311
- dogsled
14-
# - dupl # Reactivate when we want to ensure there is no code duplication
1512
- errcheck
1613
- funlen
1714
- gocyclo
1815
- gocritic
19-
- gofmt
20-
- goimports
2116
- goprintffuncname
2217
- gosec
23-
- gosimple
2418
- govet
2519
- ineffassign
2620
- misspell
2721
- nakedret
28-
# - rowserrcheck # Does not support generics yet (see https://github.com/golangci/golangci-lint/issues/2649)
29-
# - copyloopvar
3022
- staticcheck
31-
- typecheck
3223
- unconvert
3324
- unparam
3425
- unused
3526
- gocognit
3627
- nolintlint
37-
# - revive # Reactivate when we want everything to be documented
3828
- godot
3929
- promlinter
4030
- whitespace
4131
- dupword
4232
- predeclared
33+
disable:
34+
- errcheck
4335

44-
# - gochecknoglobals
45-
# - gochecknoinits
46-
47-
# - fieldalignment # Not packaged yet ?
48-
49-
# - maligned # Deprecated
50-
# - interfacer
51-
# - goerr113
52-
# - errorlint
53-
# - contextcheck
54-
# - wrapcheck
55-
# - varnamelen
56-
57-
# - durationcheck
58-
# - errname
59-
# - exhaustive
60-
# - makezero
61-
# - nilerr
62-
# - noctx
63-
# - paralleltest
64-
65-
# - wsl
66-
# - nlreturn
67-
# - ireturn
68-
# - gomnd
69-
# - forcetypeassert
70-
# - exhaustivestruct
71-
# - cyclop
72-
# - nestif
73-
# - lll
74-
# - godox
75-
# - gofumpt
76-
77-
output:
78-
formats:
79-
- format: colored-line-number
80-
print-issued-lines: true
81-
print-linter-name: true
82-
83-
linters-settings:
84-
errcheck:
85-
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
86-
# default is false: such cases aren't reported by default.
87-
check-type-assertions: false
88-
89-
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
90-
# default is false: such cases aren't reported by default.
91-
check-blank: false
92-
# govet:
93-
# report about shadowed variables
94-
#TODO# check-shadowing: true
95-
gocognit:
96-
min-complexity: 30
97-
funlen:
98-
lines: 110
99-
statements: 60
100-
gofmt:
101-
simplify: true
102-
gocyclo:
103-
min-complexity: 20
104-
# maligned: # Deprecated
105-
# suggest-new: true
106-
dupl:
107-
threshold: 150
108-
misspell:
109-
locale: US
110-
lll:
111-
line-length: 140
112-
tab-width: 1
113-
# unused:
114-
unparam:
115-
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
116-
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
117-
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
118-
# with golangci-lint call it on a directory with the changed file.
119-
check-exported: false
120-
nakedret:
121-
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
122-
max-func-lines: 30
123-
prealloc:
124-
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
125-
# True by default.
126-
simple: true
127-
range-loops: true # Report preallocation suggestions on range loops, true by default
128-
for-loops: true # Report preallocation suggestions on for loops, false by default
129-
gocritic:
130-
enabled-tags:
131-
- performance
132-
- diagnostic
133-
- style
134-
disabled-checks:
135-
- hugeParam
136-
- importShadow
137-
- ifElseChain
138-
- commentedOutCode
139-
nolintlint:
140-
require-explanation: true
141-
require-specific: true
36+
settings:
37+
errcheck:
38+
check-type-assertions: false
39+
check-blank: false
40+
gocognit:
41+
min-complexity: 30
42+
funlen:
43+
lines: 110
44+
statements: 60
45+
gocyclo:
46+
min-complexity: 20
47+
gocritic:
48+
enabled-tags:
49+
- performance
50+
- diagnostic
51+
- style
52+
disabled-checks:
53+
- hugeParam
54+
- importShadow
55+
- ifElseChain
56+
- commentedOutCode
57+
nolintlint:
58+
require-explanation: true
59+
require-specific: true
14260

14361
issues:
14462
max-issues-per-linter: 0
14563
max-same-issues: 0
146-
exclude-files:
147-
- ".*\\.pb\\.go$"
148-
- ".*\\.gen\\.go$"
149-
- ".*_gen\\.go$"
150-
new: false
151-
# Default set of ignore rules is quite usefull to avoid false positives
152-
# and annoying warnings no one cares about
153-
exclude-use-default: true
154-
include:
155-
# Re-enable revive's doc comment linters:
156-
- EXC0012
157-
- EXC0013
158-
- EXC0014
159-
- EXC0015

0 commit comments

Comments
 (0)