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 @@
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:
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:
{% 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']) }}:
- {{ to | e }} from {{ from | e }} + {{ to }} from {{ from }} | {{ last_comment }} @@ -24,4 +24,3 @@ {% endfor -%} |