diff --git a/justfile b/justfile index 5a30369..9d0d839 100644 --- a/justfile +++ b/justfile @@ -4,26 +4,29 @@ default: check-lockfile lint type-check test # Check if the lockfile is up to date check-lockfile: - uv lock --locked + uv lock --locked -# Lint code and check formatting using ruff -lint +dirs="src tests": - uv run ruff check {{ dirs }} - uv run ruff format --check {{ dirs }} +# Lint code and check formatting +lint +dirs="src tests": lint-justfile + uv run ruff check {{ dirs }} + uv run ruff format --check {{ dirs }} + +lint-justfile: + just --check --fmt --unstable # Validate static types using mypy type-check +dirs="src": - uv run mypy {{ dirs }} + uv run mypy {{ dirs }} # Run tests using pytest test $COV=env("CI", "false") $FRR_VERSION=FRR_LATEST_MAJOR_VERSION: - #!/usr/bin/env bash - set -euxo pipefail + #!/usr/bin/env bash + set -euxo pipefail - args=() - ( $COV == "true" ) && args+=( "--cov" ) - uv run pytest tests ${args[@]} + args=() + ( $COV == "true" ) && args+=( "--cov" ) + uv run pytest tests ${args[@]} - if [ $COV = "true" ]; then - uv run coverage xml - fi + if [ $COV = "true" ]; then + uv run coverage xml + fi