Skip to content

Commit be92b7f

Browse files
committed
Add ruff github action with inline annotations
1 parent 931ae54 commit be92b7f

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

{{ cookiecutter.project_name.lower().replace(' ', '-') }}/.github/workflows/{{ cookiecutter.package_name }}.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ jobs:
3939
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
4040
run: poetry install --no-interaction --no-root
4141

42-
- name: Run linters
43-
run: make lint
42+
- name: Check dependencies
43+
run: make check-dependencies
44+
45+
- name: Check codestyle
46+
run: make check-codestyle
47+
48+
- name: ruff
49+
run: make check-ruff-github
50+
51+
- name: mypy
52+
run: make check-mypy
4453

4554
test:
4655
runs-on: ubuntu-latest

{{ cookiecutter.project_name.lower().replace(' ', '-') }}/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,19 @@ check-dependencies: check-poetry check-deptry
6161
.PHONY: check-ruff
6262
check-ruff:
6363
poetry run ruff check $(CODE) --no-fix
64+
.PHONY: check-codestyle
65+
check-codestyle:
66+
poetry run ruff format $(CODE) --check
6467
{% if cookiecutter.git_platform == 'gitlab' %}
6568
.PHONY: check-ruff-gitlab
6669
check-ruff-gitlab:
6770
poetry run ruff check $(CODE) --output-format=gitlab > ruff-report.json
6871
{% endif %}
69-
.PHONY: check-codestyle
70-
check-codestyle:
71-
poetry run ruff format $(CODE) --check
72+
{% if cookiecutter.git_platform == 'github' %}
73+
.PHONY: check-ruff-github
74+
check-ruff-github:
75+
poetry run ruff check $(CODE) --no-fix --output-format=github
76+
{% endif %}
7277

7378
.PHONY: check-mypy
7479
check-mypy:

0 commit comments

Comments
 (0)