From 3ed307e113dc3b414e5c52e8d06e1aa53480de2a Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Sat, 28 Sep 2024 14:27:46 +0200 Subject: [PATCH] docs: adds a section about `exclude-dirs-use-default` (#5045) --- docs/src/docs/usage/false-positives.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/src/docs/usage/false-positives.mdx b/docs/src/docs/usage/false-positives.mdx index 46d0291b41f8..dd95bdefa9fd 100644 --- a/docs/src/docs/usage/false-positives.mdx +++ b/docs/src/docs/usage/false-positives.mdx @@ -175,3 +175,18 @@ Some exclusions are considered as common, to help golangci-lint users those comm If you don't want to use it you can set `issues.exclude-use-default` to `false`. {.DefaultExclusions} + +### Default Directory Exclusions + +By default, the reports from directory names, that match the following regular expressions, are excluded: + +- `third_party$` +- `examples$` +- `Godeps$` +- `builtin$` + +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. + +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. + +So we recommend setting `issues.exclude-dirs-use-default` to `false`.