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 ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
94c24eea20
Коммит
f4255ed52e
2
Makefile
2
Makefile
@@ -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\""; \
|
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; \
|
exit 1; \
|
||||||
fi;
|
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 \
|
if ! [ -z "${MM_VET_OPENSPEC_PATH}" ] && [ -f "${MM_VET_OPENSPEC_PATH}" ]; then \
|
||||||
VET_CMD="$$VET_CMD -openApiSync -openApiSync.spec=$$MM_VET_OPENSPEC_PATH"; \
|
VET_CMD="$$VET_CMD -openApiSync -openApiSync.spec=$$MM_VET_OPENSPEC_PATH"; \
|
||||||
else \
|
else \
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
hasRedirectURL := false
|
hasRedirectURL := false
|
||||||
if val, ok := relayProps["redirect_to"]; ok {
|
if val, ok := relayProps["redirect_to"]; ok {
|
||||||
redirectURL = val
|
redirectURL = val
|
||||||
hasRedirectURL = len(val) > 0
|
hasRedirectURL = val != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError := func(err *model.AppError) {
|
handleError := func(err *model.AppError) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user