Skip to content

Commit

Permalink
Fix code formating (go-gitea#17830)
Browse files Browse the repository at this point in the history
* fix formatter, format imports first, then go fmt
  • Loading branch information
mscherer authored Nov 27, 2021
1 parent 2e8fc5b commit 04c55e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/code-batch-process.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ func main() {
logVerbose("batch cmd: %s %v", subCmd, substArgs)
switch subCmd {
case "gitea-fmt":
cmdErrors = append(cmdErrors, passThroughCmd("gofmt", substArgs))
if containsString(subArgs, "-w") {
cmdErrors = append(cmdErrors, giteaFormatGoImports(files))
}
cmdErrors = append(cmdErrors, passThroughCmd("gofmt", substArgs))
case "misspell":
cmdErrors = append(cmdErrors, passThroughCmd("misspell", substArgs))
default:
Expand Down
6 changes: 3 additions & 3 deletions services/auth/signin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"code.gitea.io/gitea/models/login"
user_model "code.gitea.io/gitea/models/user"
"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/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/smtp"
_ "code.gitea.io/gitea/services/auth/source/pam" // register the pam source
_ "code.gitea.io/gitea/services/auth/source/sspi" // register the sspi source
)

Expand Down

0 comments on commit 04c55e9

Please sign in to comment.