коммит произвёл
Christopher Speller
родитель
9309ad9d7a
Коммит
ff0811e4a4
53
Makefile
53
Makefile
@@ -209,14 +209,20 @@ check-client-style:
|
|||||||
|
|
||||||
check-server-style: govet
|
check-server-style: govet
|
||||||
@echo Running GOFMT
|
@echo Running GOFMT
|
||||||
$(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ einterfaces/ cmd/platform/ 2>&1))
|
|
||||||
@echo "$(GOFMT_OUTPUT)"
|
@for package in $(TE_PACKAGES) $(EE_PACKAGES); do \
|
||||||
@if [ ! "$(GOFMT_OUTPUT)" ]; then \
|
echo "Checking "$$package; \
|
||||||
echo "gofmt success"; \
|
files=$$(go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \
|
||||||
else \
|
if [ "$$files" ]; then \
|
||||||
echo "gofmt failure"; \
|
gofmt_output=$$(gofmt -d -s $$files 2>&1); \
|
||||||
exit 1; \
|
if [ "$$gofmt_output" ]; then \
|
||||||
fi
|
echo "$$gofmt_output"; \
|
||||||
|
echo "gofmt failure"; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@echo "gofmt success"; \
|
||||||
|
|
||||||
check-style: check-client-style check-server-style
|
check-style: check-client-style check-server-style
|
||||||
|
|
||||||
@@ -535,37 +541,10 @@ setup-mac:
|
|||||||
|
|
||||||
govet:
|
govet:
|
||||||
@echo Running GOVET
|
@echo Running GOVET
|
||||||
|
$(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1
|
||||||
$(GO) vet $(GOFLAGS) ./api || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./api4 || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./app || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./app/plugin || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./app/plugin/jira || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./cmd/platform || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./einterfaces || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./jobs || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./manualtesting || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./model || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./model/gitlab || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./store || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./utils || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./web || exit 1
|
|
||||||
|
|
||||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/account_migration || exit 1
|
$(GO) vet $(GOFLAGS) $(EE_PACKAGES) || exit 1
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/brand || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/cluster || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/compliance || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/data_retention || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/elasticsearch || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/emoji || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/imports || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/ldap || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/metrics || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/mfa || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/oauth/google || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/oauth/office365 || exit 1
|
|
||||||
$(GO) vet $(GOFLAGS) ./enterprise/saml || exit 1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
todo:
|
todo:
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import (
|
|||||||
|
|
||||||
l4g "github.com/alecthomas/log4go"
|
l4g "github.com/alecthomas/log4go"
|
||||||
"github.com/mattermost/platform/einterfaces"
|
"github.com/mattermost/platform/einterfaces"
|
||||||
|
"github.com/mattermost/platform/jobs"
|
||||||
"github.com/mattermost/platform/model"
|
"github.com/mattermost/platform/model"
|
||||||
"github.com/mattermost/platform/store"
|
"github.com/mattermost/platform/store"
|
||||||
"github.com/mattermost/platform/utils"
|
"github.com/mattermost/platform/utils"
|
||||||
"github.com/mattermost/platform/jobs"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetLogs(page, perPage int) ([]string, *model.AppError) {
|
func GetLogs(page, perPage int) ([]string, *model.AppError) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package app
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mattermost/platform/model"
|
|
||||||
"github.com/mattermost/platform/einterfaces"
|
"github.com/mattermost/platform/einterfaces"
|
||||||
|
"github.com/mattermost/platform/model"
|
||||||
"github.com/mattermost/platform/utils"
|
"github.com/mattermost/platform/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattermost/platform/model"
|
|
||||||
"github.com/mattermost/platform/jobs"
|
"github.com/mattermost/platform/jobs"
|
||||||
|
"github.com/mattermost/platform/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetJob(id string) (*model.Job, *model.AppError) {
|
func GetJob(id string) (*model.Job, *model.AppError) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ func (watcher *Watcher) Start() {
|
|||||||
rand.Seed(time.Now().UTC().UnixNano())
|
rand.Seed(time.Now().UTC().UnixNano())
|
||||||
_ = <-time.After(time.Duration(rand.Intn(WATCHER_POLLING_INTERVAL)) * time.Millisecond)
|
_ = <-time.After(time.Duration(rand.Intn(WATCHER_POLLING_INTERVAL)) * time.Millisecond)
|
||||||
|
|
||||||
defer func(){
|
defer func() {
|
||||||
l4g.Debug("Watcher Finished")
|
l4g.Debug("Watcher Finished")
|
||||||
watcher.stopped <- true
|
watcher.stopped <- true
|
||||||
}()
|
}()
|
||||||
@@ -69,7 +69,7 @@ func (watcher *Watcher) PollAndNotify() {
|
|||||||
for _, js := range jobStatuses {
|
for _, js := range jobStatuses {
|
||||||
j := model.Job{
|
j := model.Job{
|
||||||
Type: js.Type,
|
Type: js.Type,
|
||||||
Id: js.Id,
|
Id: js.Id,
|
||||||
}
|
}
|
||||||
|
|
||||||
if js.Type == model.JOB_TYPE_DATA_RETENTION {
|
if js.Type == model.JOB_TYPE_DATA_RETENTION {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ func MakeTestScheduler(name string, jobType string) *TestScheduler {
|
|||||||
func (scheduler *TestScheduler) Run() {
|
func (scheduler *TestScheduler) Run() {
|
||||||
l4g.Debug("Scheduler %v: Started", scheduler.name)
|
l4g.Debug("Scheduler %v: Started", scheduler.name)
|
||||||
|
|
||||||
defer func(){
|
defer func() {
|
||||||
l4g.Debug("Scheduler %v: Finished", scheduler.name)
|
l4g.Debug("Scheduler %v: Finished", scheduler.name)
|
||||||
scheduler.stopped <- true
|
scheduler.stopped <- true
|
||||||
}()
|
}()
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user