-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (37 loc) · 928 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
include .env
DEFAULT_GOAL: help
install: ;@ ## Install Setup
@chmod +x scripts/install_dev.sh
@./scripts/install_dev.sh
.PHONY: install
generate: install ;@ ## Generate Go Parser
@echo "Generating Go parser with ANTLR..."
@cd $(ANTLR_DIR) && \
java -jar $(ANTLR_JAR) -Dlanguage=Go -o . -listener -visitor FSHLexer.g4 && \
java -jar $(ANTLR_JAR) -Dlanguage=Go -o . -listener -visitor FSH.g4 && \
mv *.go ../$(PARSER_DIR)
.PHONY: generate
fmt: ;@ ## Format Code
@go fmt ./...
.PHONY: fmt
lint: ;@ ## Run Linter
@@golangci-lint run ./...
.PHONY: lint
test: lint fmt ;@ ## Run Tests
@go test ./... -v
.PHONY: test
build: ; @ ## Make Build
@go build -o fshlint fshlint.go
.PHONY: build
help:
@echo
@echo
@echo fshlint
@echo
@echo Commands
@echo
@grep -hE '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo
@echo
.PHONY: help