diff options
| -rw-r--r-- | Makefile | 21 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | lexer_test.go | 2 |
3 files changed, 15 insertions, 12 deletions
@@ -1,15 +1,24 @@ -pkgs := $(shell go list ./...) +GOPATH ?= $(HOME)/go +pkgs := $(shell go list ./...) .PHONY: test test: lint ## Run tests with coverage - go test -race -short -cover -coverprofile coverage.out $(pkgs) - go tool cover -html=coverage.out -o coverage.html + go test -short -cover -coverprofile coverage.txt $(pkgs) + go tool cover -html=coverage.txt -o coverage.html .PHONY: lint -lint: - golint $(pkgs) +lint: $(GOPATH)/bin/golint ## Run the code linter + @golint $(pkgs) + +$(GOPATH)/bin/golint: + go get -u golang.org/x/lint/golint .PHONY: clean clean: ## Clean all test files - rm -rf coverage* + @rm -rf coverage* + +.PHONY: help +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \ + |awk 'BEGIN{FS=":.*?## "};{printf "\033[36m%-30s\033[0m %s\n",$$1,$$2}' @@ -1,9 +1,5 @@ # Generic Go lexer -[](https://travis-ci.org/felix/lexer) -[](http://godoc.org/github.com/felix/lexer) -[](https://goreportcard.com/report/github.com/felix/lexer) - A very simple lexer. ```go diff --git a/lexer_test.go b/lexer_test.go index 798cb3a..1795f7b 100644 --- a/lexer_test.go +++ b/lexer_test.go @@ -1,5 +1,3 @@ -// +build !race - package lexer import ( |
