-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(config): filePatterns #34615
base: main
Are you sure you want to change the base?
feat(config): filePatterns #34615
Conversation
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some more samples, which can be simplified by using glob, otherwise LGTM
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do the regex to glob changes in a followup pr of cause
needs update because of: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review done. Please note each of the suggested changes and apply them widely to the whole PR. e.g. ^foo$
patterns should always just be foo
.
`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. | ||
`filePatterns` tells Renovate which repository files to parse and extract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`filePatterns` tells Renovate which repository files to parse and extract. | |
`filePatterns` were formerly known as `fileMatch`, and regex-only. | |
`filePatterns` instead supports regex or glob patterns, and any existing config containing `fileMatch` patterns will be automatically migrated. | |
Do not use the below guide for `fileMatch` if you are using an older version of Renovate. | |
`filePatterns` tells Renovate which repository files to parse and extract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've had a change of opinion on something here. Instead of migrating + improving the regexes by converting them to glob, we should instead do the minimal work and keep them as regex.
In other words:
- Keep all default
fileMatch
values as regex, simply add/ ... /
wrappers to existing ones (do not change any to glob in this PR) - Also do the same for any config presets such as the workarounds
- For docs examples, it's OK to keep the glob changes if preferred
- Make regex to glob changes later, in more easily verifiable batches
Sure. I was thinking the same but went on as suggestions kept coming Btw, for making the verification easier & reliable, I was thinking of adding tests to each manager. The test will check if the fileMatch values work with their corresponding filenames or not. This way, when we switch to glob any faulty globs will be caught by a failed test. |
3605d14
to
e9938fc
Compare
I don't think we need any new tests yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflict and a lot of conversations should not be solved.
Reverted he changes as per this comment. Will replace regex with glob in future Prs |
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Changes
fileMatch
tofilePatterns
Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: