Open
Description
Version: 0.5.2
Reproduction instructions
-
Create a
ruff.toml
file with the contents:extend-select = [ "W", # pycodestyle warnings "I", # isort "N", # pep8-naming "D", # pydocstyle "B", # flake8-bugbear "PYI" # flake8-pyi ] # Group errors by file. output-format = "grouped" # Show source context of error. show-source = true # Show summary of fixes. show-fixes = true
-
Create a
src/foo.py
file with no contents. -
Run
ruff check
and see the problematic error message.
Output
❯ ruff check
ruff failed
Cause: Failed to parse /Users/[...]/ruff.toml
Cause: TOML parse error at line 1, column 1
|
1 | extend-select = [
| ^^^^^^^^^^^^^^^^^
unknown field `show-source`
The error message points to the line about extend-select
when complaining about show-source
as the key that is unknown. It would be better for the error to point at line 14 entirely OR, ideally, point only at show-source
part of that line since that's the key in the key-value pair in the configuration file that is unknown.