Fix report template, add djlint configuration (#804)

* Ignore some basic errors

From djlint output:
H005 2:0 Html tag should have lang attribute. <html> <head>
H016 2:0 Missing title tag in html. <html> <head>
H030 2:0 Consider adding a meta description. <html> <head>
H031 2:0 Consider adding meta keywords. <html> <head>
H006 48:20 Img tag should have height and width attributes. <img src="" />
H013 48:20 Img tag should have an alt attribute. <img src="" />
H025 87:112 Tag seems to be an orphan. </span>

* Fix input tag

Removed extra  `/` that caused reporting of next </span> tag

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
This commit is contained in:
Dominik Hendzel 2024-11-25 13:28:19 +01:00 committed by GitHub
parent 656506d2a6
commit 55a92a4620
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

View File

@ -76,6 +76,15 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
- repo: local
hooks:
- id: djlint
name: djlint
entry: djlint
files: \.jinja2$
language: python
additional_dependencies: [djlint]
- repo: https://github.com/elidupuis/mirrors-sass-lint
rev: "5cc45653263b423398e4af2561fae362903dd45d"
hooks:

View File

@ -111,3 +111,7 @@ warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
[tool.djlint]
profile = "jinja"
ignore = "H005,H016,H030,H031,H006,H013"

View File

@ -31,6 +31,7 @@
<tr id="not-found-message">
<td colspan="{{ table_head|length }}">No results found. Check the filters.</td>
</tr>
</tbody>
</template>
<template id="template_results-table__tbody">
<tbody class="results-table-row">
@ -41,14 +42,14 @@
<div class="extraHTML"></div>
<div class="media">
<div class="media-container">
<div class="media-container__nav--left"><</div>
<div class="media-container__nav--left">&lt;</div>
<div class="media-container__viewport">
<img src="" />
<video controls>
<source src="" type="video/mp4">
</video>
</div>
<div class="media-container__nav--right">></div>
<div class="media-container__nav--right">&gt;</div>
</div>
<div class="media__name"></div>
<div class="media__counter"></div>
@ -81,7 +82,7 @@
<div class="controls">
<div class="filters">
{%- for result, values in outcomes.items() %}
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="{{ result }}" {{ "disabled" if values["value"] == 0 }}/>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="{{ result }}" {{ "disabled" if values["value"] == 0 }}>
<span class="{{ result }}">{{ values["value"] }} {{ values["label"] }}{{ "," if result != "rerun" }}</span>
{%- endfor %}
</div>