diff --git a/justfile b/justfile index f44f968..3d3b79f 100755 --- a/justfile +++ b/justfile @@ -83,13 +83,13 @@ test_shfmt: @find . -type f \( -name "**.sh" -and -not -path "./.**" -and -not -path "./venv**" \) -exec shfmt -d -i 4 -bn -ci -sr "{}" \+; test_black: - @python3 -m black --check --diff . + @python3 -m black --check --diff netbox_qrgen/ test_pyright: - @python3 -m pyright . + @python3 -m pyright netbox_qrgen/ test_ruff: - @python3 -m ruff --diff . + @python3 -m ruff --diff netbox_qrgen/ test_ci_conf: @woodpecker-cli lint .woodpecker/ diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..4ffe87f --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,10 @@ +pre-commit: + commands: + 01_ruff: + stage_fixed: true + glob: "*.py" + run: python3 -m ruff --fix-only --exit-zero --silent {all_files} + 02_black: + stage_fixed: true + glob: "*.py" + run: python3 -m black --quiet {all_files}