mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-09 13:18:18 +00:00
![]() ## Summary This PR generalize the idea that we may want to emit diagnostics for invalid or incompatible configuration values similar to how we already do it for `rules`. This PR introduces a new `Settings` struct that is similar to `Options` but, unlike `Options`, are fields have their default values filled in and they use a representation optimized for reads. The diagnostics created during loading the `Settings` are stored on the `Project` so that we can emit them when calling `check`. The motivation for this work is that it simplifies adding new settings. That's also why I went ahead and added the `terminal.error-on-warning` setting to demonstrate how new settings are added. ## Test Plan Existing tests, new CLI test. |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
mdtest.py | ||
mdtest.py.lock |