Skip to content

Commit 0e2981a

Browse files
committed
chore: update golangci
Signed-off-by: Valery Piashchynski <[email protected]>
1 parent 14c121e commit 0e2981a

File tree

2 files changed

+89
-76
lines changed

2 files changed

+89
-76
lines changed

.github/workflows/linters.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
go-version: 'stable'
1717

1818
- name: Run linter
19-
uses: golangci/golangci-lint-action@v6.1.0 # Action page: <https://github.com/golangci/golangci-lint-action>
19+
uses: golangci/golangci-lint-action@v7.0.0 # Action page: <https://github.com/golangci/golangci-lint-action>
2020
with:
21-
version: v1.60 # without patch version
2221
only-new-issues: false # show only new issues if it's a pull request

.golangci.yml

Lines changed: 88 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,94 @@
1-
# Documentation: <https://github.com/golangci/golangci-lint#config-file>
2-
1+
version: "2"
32
run:
4-
timeout: 1m
53
modules-download-mode: readonly
64
allow-parallel-runners: true
7-
85
output:
96
formats:
10-
- format: colored-line-number
11-
12-
linters-settings:
13-
godot:
14-
scope: declarations
15-
capital: true
16-
dupl:
17-
threshold: 100
18-
goconst:
19-
min-len: 2
20-
min-occurrences: 3
21-
misspell:
22-
locale: US
23-
lll:
24-
line-length: 120
25-
prealloc:
26-
simple: true
27-
range-loops: true
28-
for-loops: true
29-
nolintlint:
30-
require-specific: true
31-
32-
linters: # All available linters list: <https://golangci-lint.run/usage/linters/>
33-
disable-all: true
7+
text:
8+
path: stdout
9+
linters:
10+
default: none
3411
enable:
35-
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
36-
- bodyclose # Checks whether HTTP response body is closed successfully
37-
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
38-
- dupl # Tool for code clone detection
39-
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
40-
- errorlint # find code that will cause problems with the error wrapping scheme introduced in Go 1.13
41-
- exhaustive # check exhaustiveness of enum switch statements
42-
- copyloopvar # checks for pointers to enclosing loop variables
43-
- gochecknoinits # Checks that no init functions are present in Go code
44-
- goconst # Finds repeated strings that could be replaced by a constant
45-
- gocritic # The most opinionated Go source code linter
46-
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
47-
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
48-
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
49-
- gosec # Inspects source code for security problems
50-
- gosimple # Linter for Go source code that specializes in simplifying a code
51-
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
52-
- ineffassign # Detects when assignments to existing variables are not used
53-
- misspell # Finds commonly misspelled English words in comments
54-
- nakedret # Finds naked returns in functions greater than a specified function length
55-
- nestif # Reports deeply nested if statements
56-
- noctx # finds sending http request without context.Context
57-
- nolintlint # Reports ill-formed or insufficient nolint directives
58-
- prealloc # Finds slice declarations that could potentially be preallocated
59-
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
60-
- stylecheck # Stylecheck is a replacement for golint
61-
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
62-
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
63-
- unconvert # Remove unnecessary type conversions
64-
- unparam # Reports unused function parameters
65-
- unused # Checks Go code for unused constants, variables, functions and types
66-
- whitespace # Tool for detection of leading and trailing whitespace
67-
68-
issues:
69-
exclude-dirs:
70-
- .github
71-
- .git
72-
- benchmarks
73-
exclude-files:
74-
- pkg/frame/frame_test.go
75-
- pkg/pipe/pipe_test.go
76-
- pkg/rpc/client_server.test.go
77-
exclude-rules:
78-
- path: pkg/frame/frame_test.go
79-
linters:
80-
- scopelint
12+
- asciicheck
13+
- bodyclose
14+
- copyloopvar
15+
- dogsled
16+
- dupl
17+
- errcheck
18+
- errorlint
19+
- exhaustive
20+
- gochecknoinits
21+
- goconst
22+
- gocritic
23+
- goprintffuncname
24+
- gosec
25+
- govet
26+
- ineffassign
27+
- misspell
28+
- nakedret
29+
- nestif
30+
- noctx
31+
- nolintlint
32+
- prealloc
33+
- staticcheck
34+
- tparallel
35+
- unconvert
36+
- unparam
37+
- unused
38+
- whitespace
39+
settings:
40+
dupl:
41+
threshold: 100
42+
goconst:
43+
min-len: 2
44+
min-occurrences: 3
45+
godot:
46+
scope: declarations
47+
capital: true
48+
lll:
49+
line-length: 120
50+
misspell:
51+
locale: US
52+
nolintlint:
53+
require-specific: true
54+
prealloc:
55+
simple: true
56+
range-loops: true
57+
for-loops: true
58+
exclusions:
59+
generated: lax
60+
presets:
61+
- comments
62+
- common-false-positives
63+
- legacy
64+
- std-error-handling
65+
rules:
66+
- linters:
67+
- scopelint
68+
path: pkg/frame/frame_test.go
69+
paths:
70+
- pkg/frame/frame_test.go
71+
- pkg/pipe/pipe_test.go
72+
- pkg/rpc/client_server.test.go
73+
- .github
74+
- .git
75+
- benchmarks
76+
- third_party$
77+
- builtin$
78+
- examples$
79+
formatters:
80+
enable:
81+
- gofmt
82+
- goimports
83+
exclusions:
84+
generated: lax
85+
paths:
86+
- pkg/frame/frame_test.go
87+
- pkg/pipe/pipe_test.go
88+
- pkg/rpc/client_server.test.go
89+
- .github
90+
- .git
91+
- benchmarks
92+
- third_party$
93+
- builtin$
94+
- examples$

0 commit comments

Comments
 (0)