diff --git a/.travis.yml b/.travis.yml index 35b1c4f..bc25642 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,8 @@ language: go go_import_path: github.com/kevinburke/chroma-markdown go: - - 1.9.x - - 1.10.x - 1.11.x + - 1.12.x - master script: make test diff --git a/Makefile b/Makefile index 80b7c31..84a9bf5 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,14 @@ -MEGACHECK := $(GOPATH)/bin/megacheck +STATICCHECK := $(GOPATH)/bin/staticcheck RELEASE := $(GOPATH)/bin/github-release UNAME := $(shell uname) -$(MEGACHECK): -ifeq ($(UNAME), Darwin) - curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2018-11-18/megacheck-darwin-amd64 -endif -ifeq ($(UNAME), Linux) - curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2018-11-18/megacheck-linux-amd64 -endif - chmod 755 $(MEGACHECK) +$(STATICCHECK): + go get honnef.co/go/tools/cmd/staticcheck -vet: $(MEGACHECK) +vet: $(STATICCHECK) go list ./... | grep -v vendor | xargs go vet - go list ./... | grep -v vendor | xargs $(MEGACHECK) + go list ./... | grep -v vendor | xargs $(STATICCHECK) test: vet go list ./... | grep -v vendor | xargs go test diff --git a/main.go b/main.go index 2bf06e5..bdbe9c1 100644 --- a/main.go +++ b/main.go @@ -145,7 +145,6 @@ func main() { cmark, lookErr := exec.LookPath("cmark") args := []string{cmark, "--unsafe", f.Name()} if lookErr != nil { - args = args[:0] cmark, lookErr = exec.LookPath("markdown") checkError(lookErr, "finding markdown binary") args = []string{cmark, f.Name()}