-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ | |
# vendor/ | ||
|
||
.idea | ||
|
||
coverage.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
.PHONY: all | ||
all: test lint readme fmt gomod | ||
all: test lint doctoc fmt gomod | ||
|
||
.PHONY: lint | ||
lint: | ||
@echo "running golangci-lint..." | ||
@echo "[golangci-lint] Running golangci-lint..." | ||
@golangci-lint run 2>&1 | ||
@echo "------------------------------------[Done]" | ||
|
||
.PHONY: test | ||
test: | ||
@echo "running go test..." | ||
@go test -race ./... 2>&1 | ||
@echo "[test] Running go test..." | ||
@go test ./... -coverprofile coverage.txt 2>&1 | ||
@go tool cover -html=coverage.txt | ||
@echo "------------------------------------[Done]" | ||
|
||
.PHONY: fmt | ||
fmt: | ||
@echo "format go project..." | ||
@echo "[fmt] Formatting go project..." | ||
@gofmt -s -w . 2>&1 | ||
@echo "------------------------------------[Done]" | ||
|
||
.PHONY: readme | ||
readme: | ||
@echo "running doctoc..." | ||
.PHONY: doctoc | ||
doctoc: | ||
@echo "[doctoc] Running doctoc..." | ||
@doctoc . 2>&1 | ||
@echo "------------------------------------[Done]" | ||
|
||
.PHONY: gomod | ||
gomod: | ||
@echo "running gomod tidy..." | ||
@go mod tidy | ||
@echo "[go-mod] Running gomod tidy..." | ||
@go mod tidy | ||
@echo "------------------------------------[Done]" |