Files
renovate/lib
Jamie Tanna 736dad8b91 fix(config/validation): improve message when invalid location for option (#46682)
When an option is used somewhere it isn't valid, we previously returned
an error message like so:

```
"allowedVersions" can't be used in ".". Allowed objects: packageRules.
```

This can be confusing, and when i.e. using `managerFilePatterns`, this
can be a very long list.

Instead, we can use a human-readable message to explain where it's
currently being used (instead of a possibly confusing `.`) and where it
can be used, in the same terms as our docs:

```
"allowedVersions" can't be used at the top level of a config, as it can
only be used in `packageRules`.
```

As part of #43020, we prefer the `scopes` and then fall back to the
objects an option names.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-10-12 11:06:32 +00:00
..