Skip to content

Commit 0ac1fc1

Browse files
golangci-lint: update config file to conform with 1.61.0 changes
A series of changes have made the current .golangci.yml configuration file non-conformant with latest updates, causing warnings and errors when attempting to run the tool on the plugin. This commit fixes all the reported issues with the configurtion, removing dead checkers and updating the deprecated/removed options in the config file.
1 parent b8c5d57 commit 0ac1fc1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.golangci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ issues:
2020
- linters:
2121
- lll
2222
source: "^//go:generate "
23+
- linters:
24+
- errcheck
25+
path: ".*_test.go"
2326

2427
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
2528
max-issues-per-linter: 0
@@ -30,7 +33,6 @@ issues:
3033
linters:
3134
disable-all: true
3235
enable:
33-
- deadcode
3436
- errcheck
3537
- goimports
3638
- gosimple
@@ -39,7 +41,6 @@ linters:
3941
- staticcheck
4042
- unconvert
4143
- unused
42-
- varcheck
4344
fast: true
4445

4546
# options for analysis running
@@ -76,7 +77,7 @@ run:
7677
# won't be reported. Default value is empty list, but there is
7778
# no need to include all autogenerated files, we confidently recognize
7879
# autogenerated files. If it's not please let us know.
79-
skip-files:
80+
exclude-files:
8081
- ".*\\.hcl2spec\\.go$"
8182
# - lib/bad.go
8283

@@ -93,7 +94,7 @@ run:
9394
# output configuration options
9495
output:
9596
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
96-
format: colored-line-number
97+
formats: colored-line-number
9798

9899
# print lines of code with issue, default is true
99100
print-issued-lines: true
@@ -119,7 +120,7 @@ linters-settings:
119120
# [deprecated] comma-separated list of pairs of the form pkg:regex
120121
# the regex is used to ignore names within pkg. (default "fmt:.*").
121122
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
122-
ignore: fmt:.*,io/ioutil:^Read.*,io:Close
123+
exclude-functions: fmt:.*,io/ioutil:^Read.*,io:Close
123124

124125
# path to a file containing a list of functions to exclude from checking
125126
# see https://github.com/kisielk/errcheck#excluding-functions for details

0 commit comments

Comments
 (0)