build: update golangci-lint to 1.60.1 (#23807)

* build: update golangci-lint to 1.60.1

* ci: update golangci-lint to v1.60.1

Helps with go1.23 compatability. Introduces some breaking changes / newly
enforced linter patterns so those are fixed as well.
This commit is contained in:
Seth Hoenig
2024-08-14 10:09:31 -05:00
committed by GitHub
parent f89335e01b
commit db0642099e
11 changed files with 36 additions and 44 deletions

View File

@@ -3,7 +3,7 @@
run:
# Timeout for analysis.
deadline: 10m
timeout: 10m
# Modules download mode (do not modify go.mod)
module-download-mode: readonly
@@ -11,26 +11,19 @@ run:
# Exclude test files
tests: false
# which dirs to skip: they won't be analyzed;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs:
- ui
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
skip-files:
# Skip ui and generated files
issues:
exclude-files:
- ".*\\.generated\\.go$"
- ".*bindata_assetfs\\.go$"
skip-dirs:
- ui
# output configuration options
# Output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats:
- format: colored-line-number
path: stdout
# print lines of code with issue, default is true
print-issued-lines: true
@@ -45,10 +38,9 @@ linters-settings:
# default is false: such cases aren't reported by default.
check-type-assertions: false
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exclude-functions:
- io.*
- fmt.*
# path to a file containing a list of functions to exclude from checking
# see https://github.com/kisielk/errcheck#excluding-functions for details