@@ -24,6 +24,24 @@ issues:
24
24
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
25
25
max-same-issues : 0
26
26
27
+ # Which files to exclude: they will be analyzed, but issues from them won't be reported.
28
+ # There is no need to include all autogenerated files,
29
+ # we confidently recognize autogenerated files.
30
+ # If it's not, please let us know.
31
+ # "/" will be replaced by current OS file path separator to properly work on Windows.
32
+ # Default: []
33
+ exclude-files :
34
+ - " .*\\ .hcl2spec\\ .go$"
35
+
36
+ # Enables exclude of directories:
37
+ # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
38
+ # Default: true
39
+ exclude-dirs-use-default : true
40
+
41
+ # Make issues output unique by line.
42
+ # Default: true
43
+ uniq-by-line : true
44
+
27
45
linters :
28
46
disable-all : true
29
47
enable :
64
82
# - src/external_libs
65
83
# - autogenerated_by_my_lib
66
84
67
- # default is true. Enables skipping of directories:
68
- # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
69
- skip-dirs-use-default : true
70
-
71
- # which files to skip: they will be analyzed, but issues from them
72
- # won't be reported. Default value is empty list, but there is
73
- # no need to include all autogenerated files, we confidently recognize
74
- # autogenerated files. If it's not please let us know.
75
- skip-files :
76
- - " .*\\ .hcl2spec\\ .go$"
77
- # - lib/bad.go
78
-
79
85
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
80
86
# If invoked with -mod=readonly, the go command is disallowed from the implicit
81
87
# automatic updating of go.mod described above. Instead, it fails when any changes
89
95
90
96
# output configuration options
91
97
output :
92
- # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
93
- format : colored-line-number
98
+ # The formats used to render issues.
99
+ # Formats:
100
+ # - `colored-line-number`
101
+ # - `line-number`
102
+ # - `json`
103
+ # - `colored-tab`
104
+ # - `tab`
105
+ # - `html`
106
+ # - `checkstyle`
107
+ # - `code-climate`
108
+ # - `junit-xml`
109
+ # - `junit-xml-extended`
110
+ # - `github-actions`
111
+ # - `teamcity`
112
+ # - `sarif`
113
+ # Output path can be either `stdout`, `stderr` or path to the file to write to.
114
+ #
115
+ # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
116
+ # The output can be specified for each of them by separating format name and path by colon symbol.
117
+ # Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number"
118
+ # The CLI flag (`--out-format`) override the configuration file.
119
+ #
120
+ # Default:
121
+ # formats:
122
+ # - format: colored-line-number
123
+ # path: stdout
124
+ formats :
125
+ - format : colored-line-number
94
126
95
127
# print lines of code with issue, default is true
96
128
print-issued-lines : true
97
129
98
130
# print linter name in the end of issue text, default is true
99
131
print-linter-name : true
100
132
101
- # make issues output unique by line, default is true
102
- uniq-by-line : true
103
-
104
133
105
134
# all available settings of specific linters
106
135
linters-settings :
@@ -116,7 +145,8 @@ linters-settings:
116
145
# [deprecated] comma-separated list of pairs of the form pkg:regex
117
146
# the regex is used to ignore names within pkg. (default "fmt:.*").
118
147
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
119
- ignore : fmt:.*,io/ioutil:^Read.*,io:Close
148
+ exclude-functions :
149
+ - fmt:.*,io/ioutil:^Read.*,io:Close
120
150
121
151
# path to a file containing a list of functions to exclude from checking
122
152
# see https://github.com/kisielk/errcheck#excluding-functions for details
0 commit comments