Skip to content

Commit

Permalink
Add GitHub Action to lint Python code
Browse files Browse the repository at this point in the history
[Ruff](https://beta.ruff.rs/) supports [over 500 lint rules](https://beta.ruff.rs/docs/rules) including bandit, isort, pylint, pyupgrade, and flake8 plus its plugins, and is written in Rust for speed.

The `ruff` Action uses minimal steps to run in ~10 seconds, rapidly providing intuitive GitHub Annotations to contributors.

![image](https://user-images.githubusercontent.com/3709715/223758136-afc386d2-70aa-4eff-953a-2c2d82ceea23.png)
  • Loading branch information
cclauss committed Mar 19, 2023
1 parent 0948b38 commit 55397e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -28,3 +28,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Test
run: python -m unittest discover
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip install --user ruff
- run: ruff --format=github --ignore=E40,E7,F40,F821,F841
--line-length=213 --target-version=py37 .

0 comments on commit 55397e2

Please sign in to comment.