Open ferdnyc opened 2 weeks ago
Hrm. The failure is due to ruff complaining:
Error: codespell_lib/_codespell.py:843:5: PLR0912 Too many branches (47 > 46) Error: codespell_lib/_codespell.py:843:5: PLR0915 Too many statements (123 > 119)
...because I expanded parse_file()
.
The fact that my changes pushed it just above the limits make me think that every time that function is extended, it exceeds the limits, so they get raised until it's just barely passing again.
That seems like no way to live, but if that's how it's done I guess I can just bump them again...
Passing
--machine-readable
/-m
to codespell, or settingmachine-readable = true
in the config file, will enable an output format designed to be more easily parsed, and containing the start column of the match (usually not output).Inspired by the
eslint -f compact
format (which is no longer part of standard eslint), but with an added@
at the start of each line. (Useful when combined with context or summary options, to parse only the lines containing error data).Intended primarily for actions-codespell and other wrapper scripts.
A new test,
test_machine_readable
, is added totest_basic.py
to verify basic functionality of the new option.The output, specifically, takes the form:
Line and column numbers are 1-based (
i + 1
andmatch.start() + 1
in the code, respectively).