Skip to content

Errors in --output-format=github (redundant col, endColumn is less than col) #22074

@Andrej730

Description

@Andrej730

Summary

output-format=github output format has issues preventing it from being parsed by Github.
Github is still able to show it in some places (e.g. on Summary), but it doesn't show the annotations in commits.

ruff check test.py --select RUF022 --output-format=github
# error logs from github action:
##[debug]Invalid error command value. 'col' and 'endColumn' cannot be set if 'line' and 'endLine' are different values.
##[debug]Invalid error command value. 'endColumn' cannot be less than 'col'.

Running code separately, outside CI, I get the following output. So it's indeed has endColumn being less than col and

ruff check test.py --select RUF022 --output-format=github
# ::error title=Ruff (RUF022),file=/home/test.py,line=1,col=11,endLine=6,endColumn=2::test.py:1:11: RUF022 `__all__` is not sorted

Example test.py:

# test.py
__all__ = [
    "GizmoColor",
    "GizmoAxis",
    "TextAlignment",
    "CoordinateSpace",
]

Version

ruff 0.14.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions