Feature request: Warn on unrecognized config keys
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
I copied some config over from mypy into my `pyproject.toml` and wrote `python_version` instead of the `python-version` that pyrefly expects. The key was silently ignored, so I spent a while confused about why my Python version setting had no effect. A warning would have caught it immediately.
I think this would also make pyrefly more internally consistent: an unknown *error kind* already fails to parse (e.g. `unknown variant 'unreachable-match-case'`), but an unknown *top-level key* is silently dropped. It looks like the top-level config struct doesn't reject unknown fields the way the error-kinds enum does.
I'd suggest a warning rather than a hard error — that catches typos without breaking configs shared across pyrefly versions (e.g. a newer key being read by an older binary).
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.