@@ -16,7 +16,7 @@ Otherwise, some linters have dedicated configuration to exclude or disable rules
1616
1717An example with ` staticcheck ` :
1818
19- ``` yml
19+ ``` yaml
2020linters-settings :
2121 staticcheck :
2222 checks :
@@ -35,7 +35,7 @@ Also, you can use `issues.exclude-rules` config option for per-path or per-linte
3535
3636In the following example, all the reports that contains the sentences defined in `exclude` are excluded :
3737
38- ` ` ` yml
38+ ` ` ` yaml
3939issues:
4040 exclude:
4141 - "Error return value of .((os\\ .)?std(out|err)\\ ..*|.*Close|.*Flush|os\\ .Remove(All)?|.*printf?|os\\ .(Un)?Setenv). is not checked"
@@ -45,7 +45,7 @@ issues:
4545
4646In the following example, all the reports from the linters (`linters`) that contains the text (`text`) are excluded :
4747
48- ` ` ` yml
48+ ` ` ` yaml
4949issues:
5050 exclude-rules:
5151 - linters:
@@ -55,7 +55,7 @@ issues:
5555
5656In the following example, all the reports from the linters (`linters`) that originated from the source (`source`) are excluded :
5757
58- ` ` ` yml
58+ ` ` ` yaml
5959issues:
6060 exclude-rules:
6161 - linters:
@@ -65,7 +65,7 @@ issues:
6565
6666In the following example, all the reports that contains the text (`text`) in the path (`path`) are excluded :
6767
68- ` ` ` yml
68+ ` ` ` yaml
6969issues:
7070 exclude-rules:
7171 - path: path/to/a/file.go
@@ -82,7 +82,7 @@ the `--path-prefix` parameter can be used to extend the paths before matching.
8282
8383In the following example, all the reports from the linters (` linters ` ) that concerns the path (` path ` ) are excluded:
8484
85- ``` yml
85+ ``` yaml
8686issues :
8787 exclude-rules :
8888 - path : ' (.+)_test\.go'
@@ -94,7 +94,7 @@ issues:
9494The opposite, excluding reports **except** for specific paths, is also possible.
9595In the following example, only test files get checked:
9696
97- ` ` ` yml
97+ ` ` ` yaml
9898issues :
9999 exclude-rules :
100100 - path-except : ' (.+)_test\.go'
@@ -105,15 +105,15 @@ issues:
105105
106106In the following example, all the reports related to the files (` exclude-files`) are excluded:
107107
108- ` ` ` yml
108+ ` ` ` yaml
109109issues:
110110 exclude-files:
111111 - path/to/a/file.go
112112` ` `
113113
114114In the following example, all the reports related to the directories (`exclude-dirs`) are excluded :
115115
116- ` ` ` yml
116+ ` ` ` yaml
117117issues:
118118 exclude-dirs:
119119 - path/to/a/dir/
@@ -174,18 +174,3 @@ Use `//nolint` instead of `// nolint` because machine-readable comments should h
174174Some exclusions are considered common. To help golangci-lint users those common exclusions are provided through presets.
175175
176176{.ExclusionPresets}
177-
178- # ## Default Directory Exclusions
179-
180- By default, the reports from directory names, that match the following regular expressions, are excluded :
181-
182- - ` third_party$`
183- - ` examples$`
184- - ` Godeps$`
185- - ` builtin$`
186-
187- This option has been defined when Go modules was not existed and when the golangci-lint core was different, this is not something we still recommend.
188-
189- At some point, we will remove all those obsolete exclusions, but as it's a breaking changes it will only happen inside a major version.
190-
191- So we recommend setting `issues.exclude-dirs-use-default` to `false`.
0 commit comments