Skip to content
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

Throw config validation error if combining * with other values in a matchRegexOrGlobList field #28554

Closed
rarkins opened this issue Apr 21, 2024 · 3 comments · Fixed by #28693
Closed
Assignees
Labels
core:config Related to config capabilities and presets priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Apr 21, 2024

Describe the proposed change(s).

Using matchRepositories as an example, we should throw a config validation error if the user configures * or ** patterns with any other value.

e.g. these are all not ok:

  "matchRepositories": ["*", "!abc/def"]
  "matchRepositories": ["*", "x/y", "!abc/def"]
  "matchRepositories": ["*", "x/y"]
  "matchRepositories": ["*", "**"]

We should keep a list of config options/fields which support matchRegexOrGlob - it will increase over time. I think so far it's allowedHeaders, allowedEnvVars, autodiscoverProjects and matchRepositories.

@rarkins rarkins added type:feature Feature (new functionality) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others core:config Related to config capabilities and presets labels Apr 21, 2024
@viceice
Copy link
Member

viceice commented Apr 21, 2024

we can add a new property to the options to mark them, that way we can also easily update the docs 🤗

@RahulGautamSingh
Copy link
Collaborator

RahulGautamSingh commented Apr 26, 2024

we can add a new property to the options to mark them, that way we can also easily update the docs 🤗

Name suggestion: regexOrGlobMatchingSupported or supportsRegexOrGlobaMatching

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 26, 2024

regexOrGlob: true is perhaps enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:config Related to config capabilities and presets priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
3 participants