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

Config validation: enforce top-level options #28300

Open
rarkins opened this issue Apr 10, 2024 · 0 comments · May be fixed by #28383
Open

Config validation: enforce top-level options #28300

rarkins opened this issue Apr 10, 2024 · 0 comments · May be fixed by #28383
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 status:in-progress Someone is working on implementation type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Apr 10, 2024

Describe the proposed change(s).

Config options like baseBranches should only be configured at the root/top-level of a config, but we don't have an automated way to document and validate this.

We already have a parents field in config options which is currently used to tie options to non-root objects like packageRules.

I propose:

  • Designate a new term to mean "root". Could be root, top-level, or .
  • Whenever an object has parents=root, raise a config warning error if it's found elsewhere, e.g. in packageRules

Probably done later:

  • Enforce the same in JSON schema
@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 10, 2024
@rarkins rarkins self-assigned this Apr 11, 2024
@rarkins rarkins added the status:in-progress Someone is working on implementation label Apr 11, 2024
@rarkins rarkins linked a pull request Apr 13, 2024 that will close this issue
6 tasks
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 status:in-progress Someone is working on implementation type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant