From 3e325e900f1cde275641d3afa516f87c22a1fbdb Mon Sep 17 00:00:00 2001 From: Matthias Schoettle <git@mattsch.com> Date: Mon, 30 Jan 2023 01:15:53 -0500 Subject: [PATCH] docs: improve documentation around fileMatch being additive (#20084) Co-authored-by: Rhys Arkins <rhys@arkins.net> --- docs/usage/configuration-options.md | 4 +++- docs/usage/modules/manager/index.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 47d809791f..5f2bc37017 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -821,7 +821,9 @@ Renovate can fetch release notes when they are hosted on one of these platforms: ## fileMatch -`fileMatch` is used by Renovate to know which files in a repository to parse and extract, and it is possible to override the default values to customize for your project's needs. +`fileMatch` is used by Renovate to know which files in a repository to parse and extract. +`fileMatch` patterns in the user config are added to the default values and do not replace them. +The default `fileMatch` patterns cannot be removed, so if you need to include or exclude specific paths then use the `ignorePaths` or `includePaths` configuration options. Sometimes file matches are really simple - for example with Go Modules Renovate looks for any `go.mod` file, and you probably don't need to change that default. diff --git a/docs/usage/modules/manager/index.md b/docs/usage/modules/manager/index.md index cdaa59bdb7..d6051b6c54 100644 --- a/docs/usage/modules/manager/index.md +++ b/docs/usage/modules/manager/index.md @@ -48,9 +48,9 @@ If the default `fileMatch` regular expression for a manager does not match again #### Ignoring files that match the default fileMatch -Renovate will _extend_ the existing `fileMatch`, meaning you don't need to include the default regular expressions like `Dockerfile` in your own array. +Renovate will _extend_ the existing [`fileMatch`](/configuration-options/#filematch), meaning you don't need to include the default regular expressions like `Dockerfile` in your own array. In other words, the regular expression are "additive". -If a manager matches a file that you _don't_ want it to, ignore it using the `ignorePaths` configuration option. +If a manager matches a file that you _don't_ want it to, ignore it using the [`ignorePaths`](/configuration-options/#ignorepaths) configuration option. Also, if you ever find that Renovate is _not_ matching a file name that you're certain it should, check your preset config isn't the cause of it. The `config:base` preset ignores common test and example directory names, for example. -- GitLab