Add machine-readable output format, and test#3473
Open
ferdnyc wants to merge 6 commits intocodespell-project:mainfrom
Open
Add machine-readable output format, and test#3473ferdnyc wants to merge 6 commits intocodespell-project:mainfrom
ferdnyc wants to merge 6 commits intocodespell-project:mainfrom
Conversation
Passing `--machine-readable` / `-m` to codespell, or setting `machine-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.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Author
|
Hrm. The failure is due to ruff complaining:
...because I expanded 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... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Passing
--machine-readable/-mto codespell, or settingmachine-readable = truein 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 compactformat (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.pyto verify basic functionality of the new option.The output, specifically, takes the form:
Line and column numbers are 1-based (
i + 1andmatch.start() + 1in the code, respectively).