diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b86fa852..2805405d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,12 @@ repos: rev: 22.3.0 hooks: - id: black + - repo: https://github.com/Riverside-Healthcare/djLint + rev: v1.25.0 + hooks: + - id: djlint-jinja + files: "\\.html" + types_or: ['html'] - repo: https://github.com/pycqa/flake8 rev: 5.0.4 hooks: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..f5651ac5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[tool.djlint] +profile="jinja" +linter_output_format = "{filename}:{line}: {code} {message} {match}" +# Ignore linting rules that are related to web pages +ignore = "H016,H021,H030,H031" diff --git a/templates/duplicate_copy_metadata.html b/templates/duplicate_copy_metadata.html index 1e4a3a94..b036024d 100644 --- a/templates/duplicate_copy_metadata.html +++ b/templates/duplicate_copy_metadata.html @@ -17,7 +17,7 @@ diff --git a/templates/leave_open_sec.html b/templates/leave_open_sec.html index 274dd473..47725bd6 100644 --- a/templates/leave_open_sec.html +++ b/templates/leave_open_sec.html @@ -1,4 +1,4 @@ -

Commits referencing the following security bugs have landed, and the bugs have the leave-open keyword, please double check them: +

Commits referencing the following security bugs have landed, and the bugs have the leave-open keyword, please double check them:

@@ -15,4 +15,3 @@ {% endfor -%}
-

diff --git a/templates/missed_landing_comment.html b/templates/missed_landing_comment.html index d2ae9309..cbf194df 100644 --- a/templates/missed_landing_comment.html +++ b/templates/missed_landing_comment.html @@ -1,4 +1,4 @@ -

The following bugs haven't been updated with a commit referencing them: +

The following bugs haven't been updated with a commit referencing them:

@@ -13,11 +13,10 @@ {% endfor -%}
{% for cset in csets %} - {{ cset[0]}} + {{ cset[0] }} {% endfor %}
-

diff --git a/templates/ni_from_manager_nag.html b/templates/ni_from_manager_nag.html index 5ae3e11c..4fb9c623 100644 --- a/templates/ni_from_manager_nag.html +++ b/templates/ni_from_manager_nag.html @@ -1,4 +1,4 @@ -

The following {{ plural('bug has', data, pword='bugs have') }} a needinfo, {{ plural('is', data, pword='are') }} marked as affecting a released version, and {{ plural('has', data, pword='have') }} no activity for the last {{ extra['nweeks'] }} {{ plural('week', extra['nweeks']) }}: +

The following {{ plural('bug has', data, pword='bugs have') }} a needinfo, {{ plural('is', data, pword='are') }} marked as affecting a released version, and {{ plural('has', data, pword='have') }} no activity for the last {{ extra['nweeks'] }} {{ plural('week', extra['nweeks']) }}:

@@ -15,7 +15,7 @@ {{ summary | e }}
- {{ to | e }} from {{ from | e }} + {{ to }} from {{ from }} {{ last_comment }} @@ -24,4 +24,3 @@ {% endfor -%}
-

diff --git a/templates/regression_set_status_flags.html b/templates/regression_set_status_flags.html index b3f3a2d1..4eedf1ec 100644 --- a/templates/regression_set_status_flags.html +++ b/templates/regression_set_status_flags.html @@ -9,7 +9,7 @@ Status in beta Status in release {% for esr in extra %} -Status in {{esr}} +Status in {{ esr }} {% endfor %} diff --git a/templates/triage_rotations_outdated.html b/templates/triage_rotations_outdated.html index 28a2dd7f..4c982d66 100644 --- a/templates/triage_rotations_outdated.html +++ b/templates/triage_rotations_outdated.html @@ -28,4 +28,3 @@ {% endfor -%} -