From 04c55e97a29dc9a60eafeccfb20d9f408c83ee46 Mon Sep 17 00:00:00 2001 From: mscherer Date: Sat, 27 Nov 2021 12:59:51 +0100 Subject: [PATCH] Fix code formating (#17830) * fix formatter, format imports first, then go fmt --- build/code-batch-process.go | 2 +- services/auth/signin.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/code-batch-process.go b/build/code-batch-process.go index 4759baf906..fdc5d99b97 100644 --- a/build/code-batch-process.go +++ b/build/code-batch-process.go @@ -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: diff --git a/services/auth/signin.go b/services/auth/signin.go index 5f75000d98..80be419962 100644 --- a/services/auth/signin.go +++ b/services/auth/signin.go @@ -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 )