ruff/crates/red_knot_python_semantic
Micha Reiser 678b0c2d39
[red-knot] Resolve Options to Settings (#16000)
## 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.
2025-02-10 15:28:45 +01:00
..
resources [red-knot] Unpacking and for loop assignments to attributes (#16004) 2025-02-07 11:30:51 +01:00
src [red-knot] Resolve Options to Settings (#16000) 2025-02-10 15:28:45 +01:00
tests red_knot_test: add support for diagnostic snapshotting 2025-02-05 13:02:54 -05:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml Add knot.toml schema (#15735) 2025-02-07 10:59:40 +01:00
mdtest.py [red-knot] Fix possible TOCTOU mistake in mdtest runner (#15673) 2025-01-22 15:24:25 +00:00
mdtest.py.lock [red-knot] Markdown test runner (#15632) 2025-01-21 14:06:35 +01:00