diff --git a/scripts/golangci.yml.in b/scripts/golangci.yml.in index fbdfd2267..a0bcba726 100644 --- a/scripts/golangci.yml.in +++ b/scripts/golangci.yml.in @@ -23,25 +23,27 @@ run: # include test files or not, default is 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 # 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: +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: # colored-line-number|line-number|json|tab|checkstyle|code-climate, # default is "colored-line-number" - format: colored-line-number + formats: + - format: colored-line-number # print lines of code with issue, default is true print-issued-lines: true @@ -67,9 +69,6 @@ linters-settings: # path to a file containing a list of functions to exclude from checking # see https://github.com/kisielk/errcheck#excluding-functions for details # exclude: /path/to/file.txt - govet: - # report about shadowed variables - check-shadowing: true golint: # minimal confidence for issues, default is 0.8 min-confidence: 0 @@ -183,14 +182,12 @@ linters: - wsl - funlen - testpackage - - exhaustivestruct - - nosnakecase # This requires extra addition of unnecessary code. Hence, we # prefer to disable this linter. But, it can be enabled if we # have better resolution. For more details check the # issue below. # see: https://github.com/ceph/ceph-csi/issues/1227 - - goerr113 + - err113 - forbidigo # TODO: enable gomoddirectives - gomoddirectives @@ -202,7 +199,6 @@ linters: # TODO: enable linters added in golangci-lint 1.43 - contextcheck - mnd - - gomnd - ireturn - tagliatelle - varnamelen