@@ -2,44 +2,10 @@ version: "2"
22
33# Options for analysis running.
44run :
5- # Timeout for analysis, e.g. 30s, 5m.
6- # Default: 1m
7- timeout : 10m
8-
9- # The default concurrency value is the number of available CPU.
10- concurrency : 4
11-
12- # Which dirs to skip: issues from them won't be reported.
13- # Can use regexp here: `generated.*`, regexp is applied on full path,
14- # including the path prefix if one is set.
15- # Default value is empty list,
16- # but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
17- # "/" will be replaced by current OS file path separator to properly work on Windows.
18- skip-dirs :
19- - bin
20- - docs
21- - examples
22- - hack
23-
24- # output configuration options.
25- output :
26- # Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
27- #
28- # Multiple can be specified by separating them by comma, output can be provided
29- # for each of them by separating format name and path by colon symbol.
30- # Output path can be either `stdout`, `stderr` or path to the file to write to.
31- # Example: "checkstyle:report.xml,json:stdout,colored-line-number"
32- #
33- # Default: colored-line-number
34- format : colored-line-number
35-
36- # Print lines of code with issue.
37- # Default: true
38- print-issued-lines : true
39-
40- # Print linter name in the end of issue text.
41- # Default: true
42- print-linter-lines : true
5+ # Timeout for total work, e.g. 30s, 5m, 5m30s.
6+ # If the value is lower or equal to 0, the timeout is disabled.
7+ # Default: 0 (disabled)
8+ timeout : 5m
439
4410linters :
4511 # Default set of linters.
@@ -49,107 +15,9 @@ linters:
4915 # - `none`: disables all linters by default.
5016 # - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`).
5117 # Default: standard
52- default : all
53- # All available settings of specific linters.
54- settings :
55- # See the dedicated "linters.settings" documentation section.
56- option : value
57- # Defines a set of rules to ignore issues.
58- # It does not skip the analysis, and so does not ignore "typecheck" errors.
59- exclusions :
60- # Mode of the generated files analysis.
61- #
62- # - `strict`: sources are excluded by strictly following the Go generated file convention.
63- # Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
64- # This line must appear before the first non-comment, non-blank text in the file.
65- # https://go.dev/s/generatedcode
66- # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
67- # - `disable`: disable the generated files exclusion.
68- #
69- # Default: strict
70- generated : lax
71- # Log a warning if an exclusion rule is unused.
72- # Default: false
73- warn-unused : true
74- # Predefined exclusion rules.
75- # Default: []
76- presets :
77- - comments
78- - std-error-handling
79- - common-false-positives
80- - legacy
81- # Excluding configuration per-path, per-linter, per-text and per-source.
82- rules :
83- # Exclude some linters from running on tests files.
84- - path : _test\.go
85- linters :
86- - gocyclo
87- - errcheck
88- - dupl
89- - gosec
90- # Run some linter only for test files by excluding its issues for everything else.
91- - path-except : _test\.go
92- linters :
93- - forbidigo
94- # Exclude known linters from partially hard-vendored code,
95- # which is impossible to exclude via `nolint` comments.
96- # `/` will be replaced by the current OS file path separator to properly work on Windows.
97- - path : internal/hmac/
98- text : " weak cryptographic primitive"
99- linters :
100- - gosec
101- # Exclude some `staticcheck` messages.
102- - linters :
103- - staticcheck
104- text : " SA9003:"
105- # Exclude `lll` issues for long lines with `go:generate`.
106- - linters :
107- - lll
108- source : " ^//go:generate "
109- # Which file paths to exclude: they will be analyzed, but issues from them won't be reported.
110- # "/" will be replaced by the current OS file path separator to properly work on Windows.
111- # Default: []
112- paths :
113- - " .*\\ .my\\ .go$"
114- - lib/bad.go
115- # Which file paths to not exclude.
116- # Default: []
117- paths-except :
118- - " .*\\ .my\\ .go$"
119- - lib/bad.go
18+ default : standard
12019
12120formatters :
12221 # Enable specific formatter.
12322 # Default: [] (uses standard Go formatting)
124- enable :
125- - gci
126- - gofmt
127- - gofumpt
128- - goimports
129- - golines
130- - swaggo
131- # Formatters settings.
132- settings :
133- # See the dedicated "formatters.settings" documentation section.
134- option : value
135- exclusions :
136- # Log a warning if an exclusion path is unused.
137- # Default: false
138- warn-unused : true
139- # Mode of the generated files analysis.
140- #
141- # - `strict`: sources are excluded by strictly following the Go generated file convention.
142- # Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
143- # This line must appear before the first non-comment, non-blank text in the file.
144- # https://go.dev/s/generatedcode
145- # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
146- # - `disable`: disable the generated files exclusion.
147- #
148- # Default: lax
149- generated : strict
150- # Which file paths to exclude.
151- # This option is ignored when using `--stdin` as the path is unknown.
152- # Default: []
153- paths :
154- - " .*\\ .my\\ .go$"
155- - lib/bad.go
23+ enable : []
0 commit comments