Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable H014 and H023 djlint rules #25786

Merged
merged 2 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion templates/admin/auth/edit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
</div>


<!-- ldap group begin -->
<div class="inline field">
<div class="ui checkbox">
Expand Down
1 change: 0 additions & 1 deletion templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 */}}
Expand Down
1 change: 0 additions & 1 deletion templates/install.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
<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>

Expand Down
4 changes: 2 additions & 2 deletions templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
{{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>
Expand All @@ -110,7 +110,7 @@
<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}}
Expand Down
3 changes: 0 additions & 3 deletions templates/repo/editor/edit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
{{template "repo/editor/commit_form" .}}
</form>
</div>


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why both?

<div class="ui g-modal-confirm modal" id="edit-empty-content-modal">
<div class="header">
{{svg "octicon-file"}}
Expand All @@ -73,6 +71,5 @@
</button>
</div>
</div>

</div>
{{template "base/footer" .}}
5 changes: 0 additions & 5 deletions templates/repo/settings/options.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,25 @@
<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>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file look a bit arbitrary?
What's the reason for them?

<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. */}}
Expand Down
1 change: 0 additions & 1 deletion templates/repo/tag/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@
</div>
{{end}}


{{template "base/footer" .}}
5 changes: 0 additions & 5 deletions templates/repo/wiki/revision.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,11 @@
</div>
</div>
</h4>

{{if and .Commits (gt .CommitCount 0)}}
{{template "repo/commits_list" .}}
{{end}}

{{template "base/paginate" .}}

</div>
</div>
</div>


{{template "base/footer" .}}
3 changes: 0 additions & 3 deletions templates/user/auth/change_passwd_inner.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
<label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
</div>


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, both?

<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>
Expand Down