Remove all shell presubmits (#3631)

This ports the shell presubmit to Go and makes them better; esp the
Errorf/Logf/Fatalf one because it actually parses the code and works of
the AST.

These error will now show up in the travis/circle CI runs where they
belong.

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-28 19:07:11 +00:00
committed by GitHub
parent 40d0fd8598
commit f66c2bac25
4 changed files with 134 additions and 35 deletions

View File

@@ -5,7 +5,6 @@ SYSTEM:=
CHECKS:=check
BUILDOPTS:=-v
GOPATH?=$(HOME)/go
PRESUBMIT:=core coremain plugin test request
MAKEPWD:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
CGO_ENABLED:=0
@@ -17,7 +16,7 @@ coredns: $(CHECKS)
CGO_ENABLED=$(CGO_ENABLED) $(SYSTEM) go build $(BUILDOPTS) -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=$(GITCOMMIT)" -o $(BINARY)
.PHONY: check
check: presubmit core/plugin/zplugin.go core/dnsserver/zdirectives.go
check: core/plugin/zplugin.go core/dnsserver/zdirectives.go
.PHONY: travis
travis:
@@ -69,11 +68,6 @@ gen:
pb:
$(MAKE) -C pb
# Presubmit runs all scripts in .presubmit; any non 0 exit code will fail the build.
.PHONY: presubmit
presubmit:
@for pre in $(MAKEPWD)/.presubmit/* ; do "$$pre" $(PRESUBMIT) || exit 1 ; done
.PHONY: clean
clean:
go clean