Format files (#13698)

* align "make help"

* format

* untouch build/generate-svg.js

* untouch .eslintrc

* combine editorconfig's

* rm editorconfig

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
6543 2020-11-28 07:12:22 +01:00 committed by GitHub
parent 742e21aeba
commit e7b47c5215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 92 additions and 134 deletions

View File

@ -9,7 +9,7 @@ charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[*.{go,tmpl,html}] [*.{go, tmpl, html}]
indent_style = tab indent_style = tab
[Makefile] [Makefile]

View File

@ -10,10 +10,10 @@ sed -i -r -e '/^[a-zA-Z0-9_.-]+[ ]*=[ ]*".*"$/ {
}' ./options/locale/*.ini }' ./options/locale/*.ini
# Remove translation under 25% of en_us # Remove translation under 25% of en_us
baselines=`wc -l "./options/locale_en-US.ini" | cut -d" " -f1` baselines=$(wc -l "./options/locale_en-US.ini" | cut -d" " -f1)
baselines=$((baselines / 4)) baselines=$((baselines / 4))
for filename in ./options/locale/*.ini; do for filename in ./options/locale/*.ini; do
lines=`wc -l "$filename" | cut -d" " -f1` lines=$(wc -l "$filename" | cut -d" " -f1)
if [ $lines -lt $baselines ]; then if [ $lines -lt $baselines ]; then
echo "Removing $filename: $lines/$baselines" echo "Removing $filename: $lines/$baselines"
rm "$filename" rm "$filename"

View File

@ -23,7 +23,7 @@ SCRIPT_TYPE = bash
; If the charsets have equal confidence, tie-breaking will be done by order in this list ; If the charsets have equal confidence, tie-breaking will be done by order in this list
; with charsets earlier in the list chosen in preference to those later. ; with charsets earlier in the list chosen in preference to those later.
; Adding "defaults" will place the unused charsets at that position. ; Adding "defaults" will place the unused charsets at that position.
DETECTED_CHARSETS_ORDER=UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr DETECTED_CHARSETS_ORDER = UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr
; Default ANSI charset to override non-UTF-8 charsets to ; Default ANSI charset to override non-UTF-8 charsets to
ANSI_CHARSET = ANSI_CHARSET =
; Force every new repository to be private ; Force every new repository to be private
@ -65,11 +65,11 @@ PREFIX_ARCHIVE_FILES = true
; Disable the creation of new mirrors. Pre-existing mirrors remain valid. ; Disable the creation of new mirrors. Pre-existing mirrors remain valid.
DISABLE_MIRRORS = false DISABLE_MIRRORS = false
; The default branch name of new repositories ; The default branch name of new repositories
DEFAULT_BRANCH=master DEFAULT_BRANCH = master
; Allow adoption of unadopted repositories ; Allow adoption of unadopted repositories
ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES=false ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false
; Allow deletion of unadopted repositories ; Allow deletion of unadopted repositories
ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES=false ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false
[repository.editor] [repository.editor]
; List of file extensions for which lines should be wrapped in the Monaco editor ; List of file extensions for which lines should be wrapped in the Monaco editor
@ -97,25 +97,25 @@ MAX_FILES = 5
[repository.pull-request] [repository.pull-request]
; List of prefixes used in Pull Request title to mark them as Work In Progress ; List of prefixes used in Pull Request title to mark them as Work In Progress
WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP] WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]
; List of keywords used in Pull Request comments to automatically close a related issue ; List of keywords used in Pull Request comments to automatically close a related issue
CLOSE_KEYWORDS=close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved
; List of keywords used in Pull Request comments to automatically reopen a related issue ; List of keywords used in Pull Request comments to automatically reopen a related issue
REOPEN_KEYWORDS=reopen,reopens,reopened REOPEN_KEYWORDS = reopen,reopens,reopened
; In the default merge message for squash commits include at most this many commits ; In the default merge message for squash commits include at most this many commits
DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT=50 DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50
; In the default merge message for squash commits limit the size of the commit messages to this ; In the default merge message for squash commits limit the size of the commit messages to this
DEFAULT_MERGE_MESSAGE_SIZE=5120 DEFAULT_MERGE_MESSAGE_SIZE = 5120
; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list ; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list
DEFAULT_MERGE_MESSAGE_ALL_AUTHORS=false DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false
; In default merge messages limit the number of approvers listed as Reviewed-by: to this many ; In default merge messages limit the number of approvers listed as Reviewed-by: to this many
DEFAULT_MERGE_MESSAGE_MAX_APPROVERS=10 DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10
; In default merge messages only include approvers who are official ; In default merge messages only include approvers who are official
DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY=true DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true
[repository.issue] [repository.issue]
; List of reasons why a Pull Request or Issue can be locked ; List of reasons why a Pull Request or Issue can be locked
LOCK_REASONS=Too heated,Off-topic,Resolved,Spam LOCK_REASONS = Too heated,Off-topic,Resolved,Spam
[repository.release] [repository.release]
; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. ; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
@ -133,7 +133,7 @@ SIGNING_KEY = default
SIGNING_NAME = SIGNING_NAME =
SIGNING_EMAIL = SIGNING_EMAIL =
; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter ; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter
DEFAULT_TRUST_MODEL=collaborator DEFAULT_TRUST_MODEL = collaborator
; Determines when gitea should sign the initial commit when creating a repository ; Determines when gitea should sign the initial commit when creating a repository
; Either: ; Either:
; - never ; - never
@ -158,19 +158,19 @@ MERGES = pubkey, twofa, basesigned, commitssigned
[cors] [cors]
; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers ; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers
; enable cors headers (disabled by default) ; enable cors headers (disabled by default)
ENABLED=false ENABLED = false
; scheme of allowed requests ; scheme of allowed requests
SCHEME=http SCHEME = http
; list of requesting domains that are allowed ; list of requesting domains that are allowed
ALLOW_DOMAIN=* ALLOW_DOMAIN = *
; allow subdomains of headers listed above to request ; allow subdomains of headers listed above to request
ALLOW_SUBDOMAIN=false ALLOW_SUBDOMAIN = false
; list of methods allowed to request ; list of methods allowed to request
METHODS=GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
; max time to cache response ; max time to cache response
MAX_AGE=10m MAX_AGE = 10m
; allow request with credentials ; allow request with credentials
ALLOW_CREDENTIALS=false ALLOW_CREDENTIALS = false
[ui] [ui]
; Number of repositories that are displayed on one explore page ; Number of repositories that are displayed on one explore page
@ -456,7 +456,7 @@ ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20 ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20
; Timeout the indexer if it takes longer than this to start. ; Timeout the indexer if it takes longer than this to start.
; Set to zero to disable timeout. ; Set to zero to disable timeout.
STARTUP_TIMEOUT=30s STARTUP_TIMEOUT = 30s
; repo indexer by default disabled, since it uses a lot of disk space ; repo indexer by default disabled, since it uses a lot of disk space
REPO_INDEXER_ENABLED = false REPO_INDEXER_ENABLED = false
@ -597,7 +597,7 @@ RESET_PASSWD_CODE_LIVE_MINUTES = 180
REGISTER_EMAIL_CONFIRM = false REGISTER_EMAIL_CONFIRM = false
; List of domain names that are allowed to be used to register on a Gitea instance ; List of domain names that are allowed to be used to register on a Gitea instance
; gitea.io,example.com ; gitea.io,example.com
EMAIL_DOMAIN_WHITELIST= EMAIL_DOMAIN_WHITELIST =
; Disallow registration, only allow admins to create accounts. ; Disallow registration, only allow admins to create accounts.
DISABLE_REGISTRATION = false DISABLE_REGISTRATION = false
; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false ; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false
@ -1117,15 +1117,15 @@ DEFAULT_MAX_BLOB_SIZE = 10485760
; Enables OAuth2 provider ; Enables OAuth2 provider
ENABLE = true ENABLE = true
; Lifetime of an OAuth2 access token in seconds ; Lifetime of an OAuth2 access token in seconds
ACCESS_TOKEN_EXPIRATION_TIME=3600 ACCESS_TOKEN_EXPIRATION_TIME = 3600
; Lifetime of an OAuth2 refresh token in hours ; Lifetime of an OAuth2 refresh token in hours
REFRESH_TOKEN_EXPIRATION_TIME=730 REFRESH_TOKEN_EXPIRATION_TIME = 730
; Check if refresh token got already used ; Check if refresh token got already used
INVALIDATE_REFRESH_TOKENS=false INVALIDATE_REFRESH_TOKENS = false
; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate ; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate
JWT_SECRET= JWT_SECRET =
; Maximum length of oauth2 token/cookie stored on server ; Maximum length of oauth2 token/cookie stored on server
MAX_TOKEN_LENGTH=32767 MAX_TOKEN_LENGTH = 32767
[i18n] [i18n]
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
[[ -f ./setup ]] && source ./setup [[ -f ./setup ]] && source ./setup
pushd /app/gitea > /dev/null pushd /app/gitea >/dev/null
exec su-exec $USER /app/gitea/gitea web exec su-exec $USER /app/gitea/gitea web
popd popd

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
[[ -f ./setup ]] && source ./setup [[ -f ./setup ]] && source ./setup
pushd /root > /dev/null pushd /root >/dev/null
exec su-exec root /usr/sbin/sshd -D -e 2>&1 exec su-exec root /usr/sbin/sshd -D -e 2>&1
popd popd

View File

@ -1,34 +0,0 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[*.go]
indent_style = tab
indent_size = 8
[*.{tmpl,html}]
indent_style = tab
indent_size = 4
[*.{less}]
indent_style = space
indent_size = 4
[*.{yml}]
indent_style = space
indent_size = 2
[*.js]
indent_style = space
indent_size = 4
[Makefile]
indent_style = tab
[*.md]
trim_trailing_whitespace = false

View File

@ -56,5 +56,3 @@ Pattern matching works as follows:
* To match all files named `Makefile`, use `**Makefile`. * To match all files named `Makefile`, use `**Makefile`.
* Matching a directory has no effect; the pattern `resources/bin` will not include/exclude files inside that directory; `resources/bin/**` will. * Matching a directory has no effect; the pattern `resources/bin` will not include/exclude files inside that directory; `resources/bin/**` will.
* All files and patterns are normalized to lower case, so `**Makefile`, `**makefile` and `**MAKEFILE` are equivalent. * All files and patterns are normalized to lower case, so `**Makefile`, `**makefile` and `**MAKEFILE` are equivalent.

View File

@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
No content shown here is rendered, all content is based in the template layouts/doc/search.html No content shown here is rendered, all content is based in the template layouts/doc/search.html
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.

View File

@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
No content shown here is rendered, all content is based in the template layouts/doc/search.html No content shown here is rendered, all content is based in the template layouts/doc/search.html
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.

View File

@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
No content shown here is rendered, all content is based in the template layouts/doc/search.html No content shown here is rendered, all content is based in the template layouts/doc/search.html
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.

View File

@ -22,4 +22,3 @@ This file exists solely to respond to /search URL with the related `search` layo
No content shown here is rendered, all content is based in the template layouts/doc/search.html No content shown here is rendered, all content is based in the template layouts/doc/search.html
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.

View File

@ -69,4 +69,3 @@ TAGS="bindata" make build
## 需要協助? ## 需要協助?
如果本頁中無法解決您的問題,請直接到 [Discord server](https://discord.gg/Gitea),在那邊可以快速得到協助。 如果本頁中無法解決您的問題,請直接到 [Discord server](https://discord.gg/Gitea),在那邊可以快速得到協助。

View File

@ -69,4 +69,3 @@ Feeding `go-sdk` to the available transformers yields...
| LOWER | go-sdk | | LOWER | go-sdk |
| UPPER | GO-SDK | | UPPER | GO-SDK |
| TITLE | Go-Sdk | | TITLE | Go-Sdk |