Skip to content

Commit 61e0d1a

Browse files
authored
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: - djlint/djLint#711 - djlint/djLint#712
1 parent be23b73 commit 61e0d1a

File tree

10 files changed

+3
-23
lines changed

10 files changed

+3
-23
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ djlint = "1.31.1"
1212

1313
[tool.djlint]
1414
profile="golang"
15-
ignore="H005,H006,H008,H013,H014,H016,H020,H021,H023,H026,H030,H031,T027"
15+
ignore="H005,H006,H008,H013,H016,H020,H021,H026,H030,H031,T027"

templates/admin/auth/edit.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
107107
</div>
108108

109-
110109
<!-- ldap group begin -->
111110
<div class="inline field">
112111
<div class="ui checkbox">

templates/base/head_navbar.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<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>
2424
</div>
2525

26-
2726
<!-- navbar links non-mobile -->
2827
{{if and .IsSigned .MustChangePassword}}
2928
{{/* No links */}}

templates/install.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
<span class="help">{{.locale.Tr "install.enable_update_checker_helper"}}</span>
156156
</div>
157157

158-
159158
<!-- Optional Settings -->
160159
<h4 class="ui dividing header">{{.locale.Tr "install.optional_title"}}</h4>
161160

templates/repo/diff/box.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
{{template "repo/diff/stats" dict "file" . "root" $}}
102102
{{end}}
103103
</div>
104-
<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>
104+
<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>
105105
<button class="btn interact-fg gt-p-3" data-clipboard-text="{{$file.Name}}">{{svg "octicon-copy" 14}}</button>
106106
{{if $file.IsGenerated}}
107107
<span class="ui label">{{$.locale.Tr "repo.diff.generated"}}</span>
@@ -110,7 +110,7 @@
110110
<span class="ui label">{{$.locale.Tr "repo.diff.vendored"}}</span>
111111
{{end}}
112112
{{if and $file.Mode $file.OldMode}}
113-
<span class="gt-ml-4 gt-mono">{{$file.OldMode}} &rarr; {{$file.Mode}}</span>
113+
<span class="gt-ml-4 gt-mono">{{$file.OldMode}} {{$file.Mode}}</span>
114114
{{else if $file.Mode}}
115115
<span class="gt-ml-4 gt-mono">{{$file.Mode}}</span>
116116
{{end}}

templates/repo/editor/edit.tmpl

-3
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
{{template "repo/editor/commit_form" .}}
5353
</form>
5454
</div>
55-
56-
5755
<div class="ui g-modal-confirm modal" id="edit-empty-content-modal">
5856
<div class="header">
5957
{{svg "octicon-file"}}
@@ -73,6 +71,5 @@
7371
</button>
7472
</div>
7573
</div>
76-
7774
</div>
7875
{{template "base/footer" .}}

templates/repo/settings/options.tmpl

-5
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,25 @@
4444
<label for="website">{{.locale.Tr "repo.settings.site"}}</label>
4545
<input id="website" name="website" type="url" maxlength="1024" value="{{.Repository.Website}}">
4646
</div>
47-
4847
<div class="field">
4948
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
5049
</div>
5150
</form>
5251

5352
<div class="divider"></div>
54-
5553
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
5654
{{.CsrfTokenHtml}}
5755
<div class="inline field">
5856
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
5957
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
6058
</div>
61-
6259
<div class="field">
6360
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
6461
<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
6562
</div>
6663
</form>
67-
6864
</div>
6965

70-
7166
{{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}}
7267
{{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}}
7368
{{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}}

templates/repo/tag/list.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,4 @@
7575
</div>
7676
{{end}}
7777

78-
7978
{{template "base/footer" .}}

templates/repo/wiki/revision.tmpl

-5
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,11 @@
3030
</div>
3131
</div>
3232
</h4>
33-
3433
{{if and .Commits (gt .CommitCount 0)}}
3534
{{template "repo/commits_list" .}}
3635
{{end}}
37-
3836
{{template "base/paginate" .}}
39-
4037
</div>
4138
</div>
4239
</div>
43-
44-
4540
{{template "base/footer" .}}

templates/user/auth/change_passwd_inner.tmpl

-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@
1111
<label for="password">{{.locale.Tr "password"}}</label>
1212
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
1313
</div>
14-
15-
1614
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
1715
<label for="retype">{{.locale.Tr "re_type"}}</label>
1816
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
1917
</div>
20-
2118
<div class="inline field">
2219
<label></label>
2320
<button class="ui green button">{{.locale.Tr "settings.change_password"}}</button>

0 commit comments

Comments
 (0)