aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile21
-rw-r--r--README.md4
-rw-r--r--lexer_test.go2
3 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 7ecc33b..f2a809d 100644
--- a/Makefile
+++ b/Makefile
@@ -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}'
diff --git a/README.md b/README.md
index 4c295c4..52423c7 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,5 @@
# Generic Go lexer
-[![Build Status](https://travis-ci.org/felix/lexer.svg)](https://travis-ci.org/felix/lexer)
-[![GoDoc](https://godoc.org/github.com/felix/lexer?status.svg)](http://godoc.org/github.com/felix/lexer)
-[![Go Report Card](https://goreportcard.com/badge/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 (