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:
Agniva De Sarker
2021-01-25 21:45:57 +05:30
committed by GitHub
parent 94c24eea20
commit f4255ed52e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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) {