Skip to content

Commit

Permalink
Add ruff Python linter and suppress reported issues
Browse files Browse the repository at this point in the history
* [Ruff: a fast Python linter](https://lwn.net/Articles/930487/)
* [Ruff: The First 200 Releases](https://notes.crmarsh.com/ruff-the-first-200-releases)

Even though ruff is not as good a linter as Pylint, it is still quite good and is _much_ faster:

```
$ time pylint ods_ci
real    0m10.980s, user    0m10.745s, sys     0m0.179s
$ time ruff ods_ci
real    0m0.023s, user    0m0.040s, sys     0m0.017s
```

Signed-off-by: Jiri Daněk <[email protected]>
  • Loading branch information
jiridanek authored and jstourac committed Jan 6, 2024
1 parent f8faae8 commit 2582458
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 261 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,18 @@ jobs:
isort $file --check --diff
fi
done
ruff:
name: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install ruff
run: |
pip install poetry
poetry install --only dev
- name: Run ruff check
run: poetry run ruff check ods_ci/
Loading

0 comments on commit 2582458

Please sign in to comment.