-
Notifications
You must be signed in to change notification settings - Fork 74
/
Makefile
27 lines (20 loc) · 832 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.PHONY: help regenerate test dependencies build checkers action
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
dependencies: ## Grab necessary dependencies for checkers
go version
go mod download -x
go install -x github.com/kisielk/errcheck golang.org/x/lint/golint
regenerate: ## Re-generate lexers and parsers
go install github.com/goccmack/gocc
gocc -zip -o ./internal/ dot.bnf
build: ## Perform build process
go build .
checkers: ## Run all checkers (errcheck, gofmt and golint)
errcheck -ignore 'fmt:[FS]?[Pp]rint*' ./...
gofmt -l -s -w .
golint -set_exit_status
git diff --exit-code
test: ## Perform package tests
go test ./...
action: dependencies regenerate build test checkers ## Run steps of github action