Skip to content

Commit

Permalink
ci: Add ruff linter action (#54)
Browse files Browse the repository at this point in the history
Add ruff as a CI Python linter as the flake8 Action is slated for deprecation.
  • Loading branch information
Bobbyperson authored Aug 27, 2024
1 parent ab072e5 commit 7b0b52c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Ruff linter
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: ruff check --output-format=github --ignore=E402 .
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"flake8.args": [
"--ignore=E501,E402,W503"
],
"ruff.lint.args": [
"--ignore=E402"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
Expand Down

0 comments on commit 7b0b52c

Please sign in to comment.