Skip to content

Commit a51a54f

Browse files
committed
chore: add linter and formatting checks and shortcuts
1 parent bff260f commit a51a54f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/pr.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Run linter & formatting check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check-formatting:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- uses: astral-sh/ruff-action@v1
13+
with:
14+
args: "check"
15+
16+
- uses: astral-sh/ruff-action@v1
17+
with:
18+
args: "format --check"
19+

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ clean:
2424
find . -name '*.egg' -exec rm -f {} +
2525
find . -name '*.pyc' -exec rm -f {} +
2626
find . -name '*.pyo' -exec rm -f {} +
27+
28+
lint-check:
29+
ruff check
30+
31+
format-check:
32+
ruff format --check
33+
34+
format:
35+
ruff format

0 commit comments

Comments
 (0)