1919 # build-tags:
2020 # - mytag
2121
22- # which dirs to skip: issues from them won't be reported;
23- # can use regexp here: generated.*, regexp is applied on full path;
24- # default value is empty list, but default dirs are skipped independently
25- # from this option's value (see skip-dirs-use-default).
26- # skip-dirs:
27- # - src/external_libs
28- # - autogenerated_by_my_lib
29-
30- # default is true. Enables skipping of directories:
31- # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
32- skip-dirs-use-default : true
33-
3422 # which files to skip: they will be analyzed, but issues from them
3523 # won't be reported. Default value is empty list, but there is
3624 # no need to include all autogenerated files, we confidently recognize
3927 # - ".*\\.my\\.go$"
4028 # - lib/bad.go
4129
42- # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
43- # If invoked with -mod=readonly, the go command is disallowed from the implicit
44- # automatic updating of go.mod described above. Instead, it fails when any changes
45- # to go.mod are needed. This setting is most useful to check that go.mod does
46- # not need updates, such as in a continuous integration and testing system.
47- # If invoked with -mod=vendor, the go command assumes that the vendor
48- # directory holds the correct copies of dependencies and ignores
49- # the dependency descriptions in go.mod.
50- # modules-download-mode: readonly|release|vendor
51-
5230# output configuration options
5331output :
5432 formats :
@@ -89,12 +67,12 @@ linters-settings:
8967
9068 # Disable error checking, as errorcheck detects more errors and is more configurable.
9169 gosec :
92- exclude :
93- - " G104"
70+ excludes :
71+ - " G104"
9472
9573 govet :
96- # report about shadowed variables
97- check-shadowing : false
74+ disable :
75+ - shadow
9876
9977 # settings per analyzer
10078 settings :
@@ -112,25 +90,20 @@ linters-settings:
11290 # disable:
11391 # - shadow
11492 # disable-all: false
115- golint :
93+ revive :
11694 # minimal confidence for issues, default is 0.8
117- min-confidence : 0.8
95+ confidence : 0.8
96+ ignore-generated-header : true
97+ severity : warning
11898 gofmt :
11999 # simplify code: gofmt with `-s` option, true by default
120100 simplify : true
121- goimports :
122- # put imports beginning with prefix after 3rd-party packages;
123- # it's a comma-separated list of prefixes
124- # local-prefixes: github.com/org/project
125101 gocyclo :
126102 # minimal code complexity to report, 30 by default (but we recommend 10-20)
127103 min-complexity : 30
128104 gocognit :
129105 # minimal code complexity to report, 30 by default (but we recommend 10-20)
130106 min-complexity : 100
131- maligned :
132- # print struct with more effective memory layout or not, false by default
133- suggest-new : true
134107 dupl :
135108 # tokens count to trigger issue, 150 by default
136109 threshold : 100
@@ -191,12 +164,6 @@ linters-settings:
191164 line-length : 120
192165 # tab width in spaces. Default to 1.
193166 tab-width : 1
194- unused :
195- # treat code as a program (not a library) and report unused exported identifiers; default is false.
196- # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
197- # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
198- # with golangci-lint call it on a directory with the changed file.
199- check-exported : false
200167 unparam :
201168 # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
202169 # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
@@ -269,9 +236,6 @@ linters-settings:
269236 allow-trailing-comment : false
270237 # Force newlines in end of case at this limit (0 = never).
271238 force-case-trailing-whitespace : 0
272- revive :
273- ignore-generated-header : true
274- severity : warning
275239 funlen :
276240 # Checks the number of lines in a function.
277241 # If lower than 0, disable the check.
0 commit comments