From 61c3dd3fa7a78f1ccef14328f12234a06537b17f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 22 Nov 2023 15:54:37 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=F0=9F=91=B7=20=E2=80=94=20Add=20dj?= =?UTF-8?q?lint=20in=20CI=20+=20fix=20djlint=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 5 +++++ Makefile | 4 +++- argos/server/templates/results.html | 3 ++- pyproject.toml | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1e15523..0ba1f5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,11 @@ pytest: script: - make tests +djlint: + stage: test + script: + - make djlint + pages: stage: deploy diff --git a/Makefile b/Makefile index 47d9de0..47c5700 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,8 @@ cog: ## Run cog, to integrate the CLI options to the docs. venv/bin/cog -r docs/*.md tests: install ## Run the tests venv/bin/pytest +djlint: install + venv/bin/djlint --ignore=H030,H031 --lint argos/server/templates/*html help: @python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) @@ -37,4 +39,4 @@ output.sort() # Print the help result print('\n'.join(output)) endef -export PRINT_HELP_PYSCRIPT # End of python section \ No newline at end of file +export PRINT_HELP_PYSCRIPT # End of python section diff --git a/argos/server/templates/results.html b/argos/server/templates/results.html index 79c638b..18b5c26 100644 --- a/argos/server/templates/results.html +++ b/argos/server/templates/results.html @@ -9,6 +9,7 @@ Status Severity Context + {% for result in results %} @@ -22,4 +23,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/pyproject.toml b/pyproject.toml index 8e2f3c5..7593da0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,8 @@ dev = [ "ipython>=8.16,<9", "ipdb>=0.13,<0.14", "sphinx-autobuild", - "ruff==0.1.5,<1" + "ruff==0.1.5,<1", + "djlint>=1.34.0" ] postgres = [ "psycopg2-binary>=2.9,<3",