From ef612d592c8c903fde19863dcbf425842eac8480 Mon Sep 17 00:00:00 2001 From: Simon de Vlieger Date: Tue, 5 Mar 2024 11:17:29 +0100 Subject: [PATCH] lint: add `lint-quick` target This runs `ruff` locally, outside a special created environment which makes it super quick but requires `ruff` to be installed. --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2093aa5e..1537a2d8 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,8 @@ help: @echo " help: Print this usage information." @echo " man: Generate all man-pages" @echo - @echo " lint: Check the code with linter" + @echo " lint: Check the code with linter (tox)" + @echo " lint-quick: Check the code with fast linters only (local)" @echo @echo " coverity-download: Force a new download of the coverity tool" @echo " coverity-check: Run the coverity test suite" @@ -243,13 +244,25 @@ test-all: # # Linting the code # -# Just run `make lint` and see if our linters like your code. +# Just run `make lint` and see if our linters like your code. Linters run in an +# environment created by tox. # .PHONY: lint lint: tox run-parallel -e ruff,pylint,autopep8,mypy,mypy-strict + +# +# Quick-linting the code +# +# Just run `make lint-quick` and see if our linters like your code. Linters run locally +# and need to be installed. See also `lint`. +# +.PHONY: lint-quick +lint-quick: + ruff check osbuild/ assemblers/* devices/* inputs/* mounts/* runners/* sources/*.* stages/*.* inputs/test/*.py stages/test/*.py sources/test/*.py test/ + # # Building packages #