Detect mistakes in regex manager syntax #45071
amezin
started this conversation in
Suggest an Idea
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Tell us more.
Sometimes I make a mistake when writing a
# renovate: ...comment for a regex manager. And often I don't notice it for long time.It would be nice to have a warning about such comments not matching the regex manager.
Currently, I think about the following config:
If any of the regexes from "warnOnMismatch" have matches in a file from "managerFilePatterns" that aren't recognized by the regex manager, Renovate should print a warning (which should also propagate to dependency dashboard).
I tried to get this behavior by remapping regex manager log messages to warnings (with "logLevelRemap") - but this results in too many false positives (I'd prefer to avoid listing every file one by one in "managerFilePatterns"), and also doesn't solve the problem if there are multiple comments in one file (first comment matches, second one does not - "No dependencies found in file for custom regex manager" isn't logged).
Another option is to have "warnOnMismatch" as a regular setting (not a child key of a "customManagers" entry):
Maybe this is simpler and can be combined with existing custom manager presets easier
All reactions