This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 2fb08c935eea7c0a5dd626d0cd8b295015758d84
Author: Dave Brondsema <[email protected]>
AuthorDate: Wed Jun 12 11:36:45 2024 -0400

    add jinja linter to pre-commit
---
 .pre-commit-config.yaml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bfda2f671..6526d003e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -69,6 +69,25 @@ repos:
         entry: '@extend [^%]((?![\/\/]\stest_scss_extend_pattern allow).)*$'
         exclude: 'node_modules'
 
+-   repo: https://github.com/aristanetworks/j2lint
+    rev: f291b271118c524b9ecb0bb5df9f846345963469  # latest as of June 2024
+    hooks:
+    -   id: j2lint
+        types: [html]
+        args:
+          - --extensions
+          - html
+          # only check jinja-syntax-error and jinja-statements-no-tabs
+          - --ignore
+          - single-space-decorator
+          - operator-enclosed-by-spaces
+          - jinja-statements-indentation
+          - jinja-statements-single-space
+          - jinja-statements-delimiter
+          - single-statement-per-line
+          - jinja-variable-lower-case
+          - jinja-variable-format
+          - --
 
 - repo:  https://github.com/milin/giticket
   rev: v1.4

Reply via email to