From 61e0d1a767e1a1a509de9de4aff42bdb79cc6443 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 9 Jul 2023 22:33:25 +0200 Subject: [PATCH] Enable H014 and H023 djlint rules (#25786) Enable these rules: - H014 | More than 2 blank lines. - H023 | Do not use entity references. There are more potential rules to enable but they are blocked by bugs in the linter: - https://github.com/Riverside-Healthcare/djLint/issues/711 - https://github.com/Riverside-Healthcare/djLint/issues/712 --- pyproject.toml | 2 +- templates/admin/auth/edit.tmpl | 1 - templates/base/head_navbar.tmpl | 1 - templates/install.tmpl | 1 - templates/repo/diff/box.tmpl | 4 ++-- templates/repo/editor/edit.tmpl | 3 --- templates/repo/settings/options.tmpl | 5 ----- templates/repo/tag/list.tmpl | 1 - templates/repo/wiki/revision.tmpl | 5 ----- templates/user/auth/change_passwd_inner.tmpl | 3 --- 10 files changed, 3 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7a30f591406..43c6b050bb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,4 +12,4 @@ djlint = "1.31.1" [tool.djlint] profile="golang" -ignore="H005,H006,H008,H013,H014,H016,H020,H021,H023,H026,H030,H031,T027" +ignore="H005,H006,H008,H013,H016,H020,H021,H026,H030,H031,T027" diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 801cf9e7b45..6dfa86d9dd1 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -106,7 +106,6 @@ -
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 3898c98ac9b..35aff8e5382 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -23,7 +23,6 @@
- {{if and .IsSigned .MustChangePassword}} {{/* No links */}} diff --git a/templates/install.tmpl b/templates/install.tmpl index ccbd6734700..48eabe8e741 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -155,7 +155,6 @@ {{.locale.Tr "install.enable_update_checker_helper"}}
-

{{.locale.Tr "install.optional_title"}}

diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index d12042800d2..1bc79ad2ab1 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -101,7 +101,7 @@ {{template "repo/diff/stats" dict "file" . "root" $}} {{end}} - {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}} + {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}} {{if $file.IsGenerated}} {{$.locale.Tr "repo.diff.generated"}} @@ -110,7 +110,7 @@ {{$.locale.Tr "repo.diff.vendored"}} {{end}} {{if and $file.Mode $file.OldMode}} - {{$file.OldMode}} → {{$file.Mode}} + {{$file.OldMode}} → {{$file.Mode}} {{else if $file.Mode}} {{$file.Mode}} {{end}} diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index 2f47616dc5d..cfdb6298e58 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -52,8 +52,6 @@ {{template "repo/editor/commit_form" .}} - - - {{template "base/footer" .}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 4aff754e2cc..ef72c0eadc5 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -44,30 +44,25 @@ -
-
{{.CsrfTokenHtml}}
-
- - {{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}} {{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}} {{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}} diff --git a/templates/repo/tag/list.tmpl b/templates/repo/tag/list.tmpl index 8651bfe2ec9..5dfa79cd188 100644 --- a/templates/repo/tag/list.tmpl +++ b/templates/repo/tag/list.tmpl @@ -75,5 +75,4 @@ {{end}} - {{template "base/footer" .}} diff --git a/templates/repo/wiki/revision.tmpl b/templates/repo/wiki/revision.tmpl index b2d6e63924f..b2c6ccf900e 100644 --- a/templates/repo/wiki/revision.tmpl +++ b/templates/repo/wiki/revision.tmpl @@ -30,16 +30,11 @@ - {{if and .Commits (gt .CommitCount 0)}} {{template "repo/commits_list" .}} {{end}} - {{template "base/paginate" .}} - - - {{template "base/footer" .}} diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl index 4b18ac944fb..40281f8578e 100644 --- a/templates/user/auth/change_passwd_inner.tmpl +++ b/templates/user/auth/change_passwd_inner.tmpl @@ -11,13 +11,10 @@ - -
-