Skip to content

Commit

Permalink
chore: add linter and formatting checks and shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Oct 15, 2024
1 parent bff260f commit a51a54f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Run linter & formatting check

on: [push, pull_request]

jobs:
check-formatting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: astral-sh/ruff-action@v1
with:
args: "check"

- uses: astral-sh/ruff-action@v1
with:
args: "format --check"

9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ clean:
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +

lint-check:
ruff check

format-check:
ruff format --check

format:
ruff format

0 comments on commit a51a54f

Please sign in to comment.