Skip to content

Commit

Permalink
Merge pull request #14 from AlessandroMiola/add_justfile
Browse files Browse the repository at this point in the history
feat: add justfile
  • Loading branch information
AlessandroMiola authored Feb 9, 2024
2 parents e29dc7b + 7edda3e commit 9dae344
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Use PowerShell instead of sh
set shell := ["powershell.exe", "-c"]

help:
@just --list

install:
@echo "πŸš€ Installing dependencies"
@poetry install --with dev

check-project:
@echo "πŸš€ Checking consistency between poetry.lock and pyproject.toml"
@poetry check --lock

ruff:
@echo "πŸš€ Linting the project with Ruff"
@poetry run ruff check .

ruff-show-violations:
@echo "πŸš€ Linting the project with Ruff and show violations"
@poetry run ruff check --output-format="grouped" .

ruff-fix:
@echo "πŸš€ Linting the project with Ruff and autofix violations (where possible)"
@poetry run ruff check --fix .

black:
@echo "πŸš€ Formatting the code with Black"
@poetry run black .

black-check:
@echo "πŸš€ Listing files Black would reformat"
@poetry run black --check .

black-diff:
@echo "πŸš€ Checking formatting advices from Black"
@poetry run black --diff .

lint-and-format: ruff-fix black

0 comments on commit 9dae344

Please sign in to comment.