From 393aa12ae2cfa52eb55199137c7362a207d2df4c Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 25 Mar 2024 23:29:59 +0100 Subject: [PATCH 1/5] Add svg linter and fix incorrect svgs --- .github/workflows/pull-compliance.yml | 4 ++++ Makefile | 3 ++- templates/devtest/flex-list.tmpl | 4 ++-- templates/repo/diff/comment_form.tmpl | 2 +- tools/lint-templates-svg.js | 26 ++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100755 tools/lint-templates-svg.js diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 02a265b1ffdad..99a69ab174957 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -35,8 +35,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.12" + - uses: actions/setup-node@v4 + with: + node-version: 20 - run: pip install poetry - run: make deps-py + - run: make deps-frontend - run: make lint-templates lint-yaml: diff --git a/Makefile b/Makefile index 236f115a2f27b..a7e175e76b479 100644 --- a/Makefile +++ b/Makefile @@ -434,7 +434,8 @@ lint-actions: $(GO) run $(ACTIONLINT_PACKAGE) .PHONY: lint-templates -lint-templates: .venv +lint-templates: .venv node_modules + @node tools/lint-templates-svg.js @poetry run djlint $(shell find templates -type f -iname '*.tmpl') .PHONY: lint-yaml diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl index d5678566d8846..015ab1e154631 100644 --- a/templates/devtest/flex-list.tmpl +++ b/templates/devtest/flex-list.tmpl @@ -25,7 +25,7 @@
diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 6a5dec6c48bf0..856b3da01a345 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -26,7 +26,7 @@ {{end}}