forked from gitea/gitea
1
0
Fork 0

Fix code formating (#17830)

* fix formatter, format imports first, then go fmt
This commit is contained in:
mscherer 2021-11-27 12:59:51 +01:00 committed by GitHub
parent 2e8fc5b034
commit 04c55e97a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -267,10 +267,10 @@ func main() {
logVerbose("batch cmd: %s %v", subCmd, substArgs) logVerbose("batch cmd: %s %v", subCmd, substArgs)
switch subCmd { switch subCmd {
case "gitea-fmt": case "gitea-fmt":
cmdErrors = append(cmdErrors, passThroughCmd("gofmt", substArgs))
if containsString(subArgs, "-w") { if containsString(subArgs, "-w") {
cmdErrors = append(cmdErrors, giteaFormatGoImports(files)) cmdErrors = append(cmdErrors, giteaFormatGoImports(files))
} }
cmdErrors = append(cmdErrors, passThroughCmd("gofmt", substArgs))
case "misspell": case "misspell":
cmdErrors = append(cmdErrors, passThroughCmd("misspell", substArgs)) cmdErrors = append(cmdErrors, passThroughCmd("misspell", substArgs))
default: default:

View File

@ -11,12 +11,12 @@ import (
"code.gitea.io/gitea/models/login" "code.gitea.io/gitea/models/login"
user_model "code.gitea.io/gitea/models/user" user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/services/auth/source/oauth2"
"code.gitea.io/gitea/services/auth/source/smtp"
_ "code.gitea.io/gitea/services/auth/source/db" // register the sources (and below) _ "code.gitea.io/gitea/services/auth/source/db" // register the sources (and below)
_ "code.gitea.io/gitea/services/auth/source/ldap" // register the ldap source _ "code.gitea.io/gitea/services/auth/source/ldap" // register the ldap source
"code.gitea.io/gitea/services/auth/source/oauth2"
_ "code.gitea.io/gitea/services/auth/source/pam" // register the pam source _ "code.gitea.io/gitea/services/auth/source/pam" // register the pam source
"code.gitea.io/gitea/services/auth/source/smtp"
_ "code.gitea.io/gitea/services/auth/source/sspi" // register the sspi source _ "code.gitea.io/gitea/services/auth/source/sspi" // register the sspi source
) )