Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Ruff output in Github Action inconsistent with local Ruff run (I001) #20

@carschno

Description

@carschno

I have integrated a Ruff linting stage in my Github workflow.

I run Ruff locally on the same branch and in the same version, no issues are detected:

% ruff --version
ruff 0.3.2
% ruff check --verbose --select=I001 document_segmentation/model/page_sequence_tagger.py
[2024-03-13][12:00:16][ruff::resolve][DEBUG] Using configuration file (via parent) at: document-segmentation/pyproject.toml
[2024-03-13][12:00:16][ruff::commands::check][DEBUG] Identified files to lint in: 2.004041ms
[2024-03-13][12:00:16][ruff::commands::check][DEBUG] Checked 1 files in: 18.667µs

No issues found.
However, the Github action fails with this error:

Run chartboost/ruff-action@v1
Run if [ "$RUNNER_OS" == "Windows" ]; then
creating virtual environment...
installing ruff from spec 'ruff==0.3.2'...
document_segmentation/model/page_sequence_tagger.py:1:1: I001 [*] Import block is un-sorted or un-formatted
Found 1 error.
[*] 1 fixable with the `--fix` option.
Error: Process completed with exit code 1.

On my code, the issue has only recently started, presumably related to adding a new import statement to the file in question. However, I do not see why Ruff does not detect an issue locally, but does so in the Github action.

The code I have been using is available in the repository, and I have linked the specific actions and files above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions