]> source.dussan.org Git - gitea.git/commitdiff
Enable H014 and H023 djlint rules (#25786)
authorsilverwind <me@silverwind.io>
Sun, 9 Jul 2023 20:33:25 +0000 (22:33 +0200)
committerGitHub <noreply@github.com>
Sun, 9 Jul 2023 20:33:25 +0000 (20:33 +0000)
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
templates/admin/auth/edit.tmpl
templates/base/head_navbar.tmpl
templates/install.tmpl
templates/repo/diff/box.tmpl
templates/repo/editor/edit.tmpl
templates/repo/settings/options.tmpl
templates/repo/tag/list.tmpl
templates/repo/wiki/revision.tmpl
templates/user/auth/change_passwd_inner.tmpl

index 7a30f5914066e055e9176993312a79354d02440f..43c6b050bb64e7ae089d8be583bbeb8cd79864e0 100644 (file)
@@ -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"
index 801cf9e7b45489c9b4939dfc32cb14b480b385c6..6dfa86d9dd154d19617c83e0718a48214bcbac68 100644 (file)
                                                <input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
                                        </div>
 
-
                                        <!-- ldap group begin -->
                                        <div class="inline field">
                                                <div class="ui checkbox">
index 3898c98ac9b77aff840251f323307c6d100c041f..35aff8e538251bafb2e4df4dacca758c8b504565 100644 (file)
@@ -23,7 +23,6 @@
                        <button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
                </div>
 
-
                <!-- navbar links non-mobile -->
                {{if and .IsSigned .MustChangePassword}}
                        {{/* No links */}}
index ccbd67347000bbdfe93fcd3299853cc92fdebf27..48eabe8e7410d009b29b71f9170a0e1cde73b757 100644 (file)
                                                <span class="help">{{.locale.Tr "install.enable_update_checker_helper"}}</span>
                                        </div>
 
-
                                        <!-- Optional Settings -->
                                        <h4 class="ui dividing header">{{.locale.Tr "install.optional_title"}}</h4>
 
index d12042800d2dbc6ea52a8630e543f0e865911d9b..1bc79ad2ab1ff97481c125d6962a376521d9209d 100644 (file)
                                                                                {{template "repo/diff/stats" dict "file" . "root" $}}
                                                                        {{end}}
                                                                </div>
-                                                               <span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
+                                                               <span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
                                                                <button class="btn interact-fg gt-p-3" data-clipboard-text="{{$file.Name}}">{{svg "octicon-copy" 14}}</button>
                                                                {{if $file.IsGenerated}}
                                                                        <span class="ui label">{{$.locale.Tr "repo.diff.generated"}}</span>
                                                                        <span class="ui label">{{$.locale.Tr "repo.diff.vendored"}}</span>
                                                                {{end}}
                                                                {{if and $file.Mode $file.OldMode}}
-                                                                       <span class="gt-ml-4 gt-mono">{{$file.OldMode}} &rarr; {{$file.Mode}}</span>
+                                                                       <span class="gt-ml-4 gt-mono">{{$file.OldMode}}  {{$file.Mode}}</span>
                                                                {{else if $file.Mode}}
                                                                        <span class="gt-ml-4 gt-mono">{{$file.Mode}}</span>
                                                                {{end}}
index 2f47616dc5de2aa1eb742296150ea2431cae163e..cfdb6298e58e768634245dd5df816dbc9b6d54cd 100644 (file)
@@ -52,8 +52,6 @@
                        {{template "repo/editor/commit_form" .}}
                </form>
        </div>
-
-
        <div class="ui g-modal-confirm modal" id="edit-empty-content-modal">
                <div class="header">
                        {{svg "octicon-file"}}
@@ -73,6 +71,5 @@
                        </button>
                </div>
        </div>
-
 </div>
 {{template "base/footer" .}}
index 4aff754e2ccd60cc892b65a06a7bfab8cbb10240..ef72c0eadc5f937080ed08b55a90aad2c556283d 100644 (file)
                                        <label for="website">{{.locale.Tr "repo.settings.site"}}</label>
                                        <input id="website" name="website" type="url" maxlength="1024" value="{{.Repository.Website}}">
                                </div>
-
                                <div class="field">
                                        <button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
                                </div>
                        </form>
 
                        <div class="divider"></div>
-
                        <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
                                {{.CsrfTokenHtml}}
                                <div class="inline field">
                                        <label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
                                        <input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
                                </div>
-
                                <div class="field">
                                        <button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
                                        <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
                                </div>
                        </form>
-
                </div>
 
-
                {{/* 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. */}}
index 8651bfe2ec949dc88a72abfd6c5916219d4d6e6a..5dfa79cd188b099140d7d7ab67bb47c7c239fcac 100644 (file)
@@ -75,5 +75,4 @@
 </div>
 {{end}}
 
-
 {{template "base/footer" .}}
index b2d6e63924fc039f9f59b146c307c78055cf9ed3..b2c6ccf900e945df92e5ab521186d42161425517 100644 (file)
                                        </div>
                                </div>
                        </h4>
-
                        {{if and .Commits (gt .CommitCount 0)}}
                                {{template "repo/commits_list" .}}
                        {{end}}
-
                        {{template "base/paginate" .}}
-
                </div>
        </div>
 </div>
-
-
 {{template "base/footer" .}}
index 4b18ac944fbe4e83b1d7e3e12958145e17dbed36..40281f8578e205cb17eebdb8839c17330394c1c0 100644 (file)
                                <label for="password">{{.locale.Tr "password"}}</label>
                                <input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
                        </div>
-
-
                        <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
                                <label for="retype">{{.locale.Tr "re_type"}}</label>
                                <input id="retype" name="retype" type="password" autocomplete="new-password" required>
                        </div>
-
                        <div class="inline field">
                                <label></label>
                                <button class="ui green button">{{.locale.Tr "settings.change_password"}}</button>