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

Enforce tab indentation in templates #15289

Merged
merged 5 commits into from
Apr 11, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ insert_final_newline = true
[*.{go,tmpl,html}]
indent_style = tab

[templates/custom/*.tmpl]
insert_final_newline = false
zeripath marked this conversation as resolved.
Show resolved Hide resolved

[templates/swagger/v1_json.tmpl]
indent_style = space

[Makefile]
indent_style = tab

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ lint: lint-frontend lint-backend
lint-frontend: node_modules
npx eslint --color --max-warnings=0 web_src/js build templates *.config.js
npx stylelint --color --max-warnings=0 web_src/less
npx editorconfig-checker templates

.PHONY: lint-backend
lint-backend: golangci-lint revive vet
Expand Down
70 changes: 70 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"devDependencies": {
"eslint": "7.23.0",
"editorconfig-checker": "4.0.2",
"eslint-plugin-html": "6.1.2",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-unicorn": "29.0.0",
Expand Down
Empty file modified templates/admin/auth/edit.tmpl
Whitespace-only changes.
Empty file modified templates/admin/auth/new.tmpl
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Empty file modified templates/admin/base/search.tmpl
Whitespace-only changes.
Empty file modified templates/admin/repo/list.tmpl
Whitespace-only changes.
Empty file modified templates/admin/repo/unadopted.tmpl
Whitespace-only changes.
Empty file modified templates/base/alert_details.tmpl
Whitespace-only changes.
Empty file modified templates/base/head.tmpl
Whitespace-only changes.
1 change: 0 additions & 1 deletion templates/explore/code.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
</div>
</form>
<div class="ui divider"></div>

<div class="ui user list">
{{if .SearchResults}}
<h3>
Expand Down
Empty file modified templates/explore/organizations.tmpl
Whitespace-only changes.
Empty file modified templates/explore/repo_search.tmpl
Whitespace-only changes.
Empty file modified templates/explore/search.tmpl
Whitespace-only changes.
Empty file modified templates/explore/users.tmpl
Whitespace-only changes.
Empty file modified templates/mail/issue/assigned.tmpl
Whitespace-only changes.
Empty file modified templates/mail/issue/default.tmpl
Whitespace-only changes.
Whitespace-only changes.
Empty file modified templates/mail/release.tmpl
Whitespace-only changes.
Empty file modified templates/org/home.tmpl
Whitespace-only changes.
Empty file modified templates/org/settings/labels.tmpl
Whitespace-only changes.
Empty file modified templates/org/team/navbar.tmpl
Whitespace-only changes.
Empty file modified templates/post-install.tmpl
Whitespace-only changes.
Empty file modified templates/repo/activity.tmpl
Whitespace-only changes.
Empty file modified templates/repo/blame.tmpl
Whitespace-only changes.
Empty file modified templates/repo/branch/list.tmpl
Whitespace-only changes.
Empty file modified templates/repo/commit_page.tmpl
Whitespace-only changes.
Empty file modified templates/repo/commits_table.tmpl
Whitespace-only changes.
Empty file modified templates/repo/diff/compare.tmpl
Whitespace-only changes.
Empty file modified templates/repo/diff/csv_diff.tmpl
Whitespace-only changes.
Empty file modified templates/repo/diff/image_diff.tmpl
Whitespace-only changes.
12 changes: 4 additions & 8 deletions templates/repo/diff/new_review.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@
<a class="muted close px-3">{{svg "octicon-x" 16}}</a>
</div>
<div class="ui field">
<textarea name="content" tabindex="0" rows="2"
placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
<textarea name="content" tabindex="0" rows="2" placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
</div>
<div class="ui divider"></div>
<button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
<button type="submit" name="type" value="comment"
class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
<button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
<button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
<button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
</form>
</div>
</div>
Expand Down
Empty file modified templates/repo/editor/edit.tmpl
Whitespace-only changes.
Empty file modified templates/repo/header.tmpl
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
1 change: 0 additions & 1 deletion templates/repo/issue/labels/edit_delete_label.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@
</div>
</div>
</div>

3 changes: 1 addition & 2 deletions templates/repo/issue/labels/label_load_template.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<div class="ui attached left aligned segment">
<!-- <h4 class="ui header">
{{.i18n.Tr "repo.issues.label_templates.title"}}
<a target="_blank" rel="noopener noreferrer"
href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
<a target="_blank" rel="noopener noreferrer" href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
<span class="octicon octicon-question"></span>
</a>
</h4> -->
Expand Down
Whitespace-only changes.
Empty file modified templates/repo/issue/milestones.tmpl
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Empty file modified templates/repo/issue/view_title.tmpl
Whitespace-only changes.
Empty file modified templates/repo/migrate/github.tmpl
Whitespace-only changes.
Empty file modified templates/repo/migrate/gitlab.tmpl
Whitespace-only changes.
Empty file modified templates/repo/migrate/gogs.tmpl
Whitespace-only changes.
Empty file modified templates/repo/pulls/status.tmpl
Whitespace-only changes.
Empty file modified templates/repo/release/list.tmpl
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Empty file modified templates/repo/view_file.tmpl
Whitespace-only changes.
Empty file modified templates/repo/wiki/revision.tmpl
Whitespace-only changes.
Empty file modified templates/shared/issuelist.tmpl
Whitespace-only changes.
1 change: 0 additions & 1 deletion templates/user/auth/signup_openid_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
{{end}}
</div>
</div>

Empty file modified templates/user/auth/twofa.tmpl
Whitespace-only changes.
Empty file modified templates/user/dashboard/issues.tmpl
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Empty file modified templates/user/settings/repos.tmpl
Whitespace-only changes.
1 change: 0 additions & 1 deletion templates/user/settings/security_u2f.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@
</div>
{{template "base/delete_modal_actions" .}}
</div>