mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
Enable govet check for empty strings (#16785)
Adds the check for https://github.com/mattermost/mattermost-server/issues/16674 in the Makefile ```release-note NONE ```
This commit is contained in:
@@ -576,7 +576,7 @@ vet: ## Run mattermost go vet specific checks
|
||||
echo "mattermost-govet is not installed. Please install it executing \"GO111MODULE=off GOBIN=$(PWD)/bin go get -u github.com/mattermost/mattermost-govet\""; \
|
||||
exit 1; \
|
||||
fi;
|
||||
@VET_CMD="-license -structuredLogging -inconsistentReceiverName -inconsistentReceiverName.ignore=session_serial_gen.go,team_member_serial_gen.go,user_serial_gen.go -tFatal"; \
|
||||
@VET_CMD="-license -structuredLogging -inconsistentReceiverName -inconsistentReceiverName.ignore=session_serial_gen.go,team_member_serial_gen.go,user_serial_gen.go -emptyStrCmp -tFatal"; \
|
||||
if ! [ -z "${MM_VET_OPENSPEC_PATH}" ] && [ -f "${MM_VET_OPENSPEC_PATH}" ]; then \
|
||||
VET_CMD="$$VET_CMD -openApiSync -openApiSync.spec=$$MM_VET_OPENSPEC_PATH"; \
|
||||
else \
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
hasRedirectURL := false
|
||||
if val, ok := relayProps["redirect_to"]; ok {
|
||||
redirectURL = val
|
||||
hasRedirectURL = len(val) > 0
|
||||
hasRedirectURL = val != ""
|
||||
}
|
||||
|
||||
handleError := func(err *model.AppError) {
|
||||
|
||||
Reference in New Issue
Block a user