mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-04-11 18:13:00 +00:00
ci: cleanup golangci configuration
While running golangci there are messages logged about deprecated configuration options and deactivated linters. The golangci.yml file needs a few small corrections to address those warnings. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
f13005bda9
commit
91baf7681d
@ -23,25 +23,27 @@ run:
|
|||||||
# include test files or not, default is true
|
# include test files or not, default is true
|
||||||
tests: true
|
tests: true
|
||||||
|
|
||||||
# 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:
|
|
||||||
- vendor$
|
|
||||||
|
|
||||||
# which files to skip: they will be analyzed, but issues from them
|
# which files to skip: they will be analyzed, but issues from them
|
||||||
# won't be reported. Default value is empty list, but there is
|
# won't be reported. Default value is empty list, but there is
|
||||||
# no need to include all autogenerated files, we confidently recognize
|
# no need to include all autogenerated files, we confidently recognize
|
||||||
# autogenerated files. If it's not please let us know.
|
# autogenerated files. If it's not please let us know.
|
||||||
skip-files:
|
skip-files:
|
||||||
|
|
||||||
|
issues:
|
||||||
|
# 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$
|
||||||
|
exclude-dirs:
|
||||||
|
- vendor$
|
||||||
|
|
||||||
# output configuration options
|
# output configuration options
|
||||||
output:
|
output:
|
||||||
# colored-line-number|line-number|json|tab|checkstyle|code-climate,
|
# colored-line-number|line-number|json|tab|checkstyle|code-climate,
|
||||||
# default is "colored-line-number"
|
# default is "colored-line-number"
|
||||||
format: colored-line-number
|
formats:
|
||||||
|
- format: colored-line-number
|
||||||
|
|
||||||
# print lines of code with issue, default is true
|
# print lines of code with issue, default is true
|
||||||
print-issued-lines: true
|
print-issued-lines: true
|
||||||
@ -67,9 +69,6 @@ linters-settings:
|
|||||||
# path to a file containing a list of functions to exclude from checking
|
# path to a file containing a list of functions to exclude from checking
|
||||||
# see https://github.com/kisielk/errcheck#excluding-functions for details
|
# see https://github.com/kisielk/errcheck#excluding-functions for details
|
||||||
# exclude: /path/to/file.txt
|
# exclude: /path/to/file.txt
|
||||||
govet:
|
|
||||||
# report about shadowed variables
|
|
||||||
check-shadowing: true
|
|
||||||
golint:
|
golint:
|
||||||
# minimal confidence for issues, default is 0.8
|
# minimal confidence for issues, default is 0.8
|
||||||
min-confidence: 0
|
min-confidence: 0
|
||||||
@ -183,14 +182,12 @@ linters:
|
|||||||
- wsl
|
- wsl
|
||||||
- funlen
|
- funlen
|
||||||
- testpackage
|
- testpackage
|
||||||
- exhaustivestruct
|
|
||||||
- nosnakecase
|
|
||||||
# This requires extra addition of unnecessary code. Hence, we
|
# This requires extra addition of unnecessary code. Hence, we
|
||||||
# prefer to disable this linter. But, it can be enabled if we
|
# prefer to disable this linter. But, it can be enabled if we
|
||||||
# have better resolution. For more details check the
|
# have better resolution. For more details check the
|
||||||
# issue below.
|
# issue below.
|
||||||
# see: https://github.com/ceph/ceph-csi/issues/1227
|
# see: https://github.com/ceph/ceph-csi/issues/1227
|
||||||
- goerr113
|
- err113
|
||||||
- forbidigo
|
- forbidigo
|
||||||
# TODO: enable gomoddirectives
|
# TODO: enable gomoddirectives
|
||||||
- gomoddirectives
|
- gomoddirectives
|
||||||
@ -202,7 +199,6 @@ linters:
|
|||||||
# TODO: enable linters added in golangci-lint 1.43
|
# TODO: enable linters added in golangci-lint 1.43
|
||||||
- contextcheck
|
- contextcheck
|
||||||
- mnd
|
- mnd
|
||||||
- gomnd
|
|
||||||
- ireturn
|
- ireturn
|
||||||
- tagliatelle
|
- tagliatelle
|
||||||
- varnamelen
|
- varnamelen
|
||||||
|
Loading…
Reference in New Issue
Block a user