-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* misc: fix dependabot alert * bump: CHANGELOG.md Co-authored-by: Agung Hariadi Tedja <[email protected]>
- Loading branch information
Showing
9 changed files
with
65 additions
and
34 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
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,12 +1,32 @@ | ||
SHELL:=/bin/bash | ||
|
||
changelog_args=-o CHANGELOG.md -tag-filter-pattern '^v' | ||
test_command=richgo test ./... $(TEST_ARGS) -v --cover | ||
|
||
lint: | ||
golangci-lint run --concurrency 4 --print-issued-lines=false --exclude-use-default=false --enable=golint --enable=goimports --enable=unconvert --enable=unparam --fix | ||
golangci-lint run --concurrency 4 --print-issued-lines=false --exclude-use-default=false --enable=revive --enable=goimports --enable=unconvert --fix | ||
|
||
changelog: | ||
ifdef version | ||
$(eval changelog_args=--next-tag $(version) $(changelog_args)) | ||
endif | ||
git-chglog $(changelog_args) | ||
git-chglog $(changelog_args) | ||
|
||
check-gotest: | ||
ifeq (, $(shell which richgo)) | ||
$(warning "richgo is not installed, falling back to plain go test") | ||
$(eval TEST_BIN=go test) | ||
else | ||
$(eval TEST_BIN=richgo test) | ||
endif | ||
ifdef test_run | ||
$(eval TEST_ARGS := -run $(test_run)) | ||
endif | ||
$(eval test_command=$(TEST_BIN) ./... $(TEST_ARGS) -v --cover) | ||
|
||
test-only: check-gotest | ||
$(test_command) | ||
|
||
test: lint test-only | ||
|
||
.PHONY: lint changelog check-gotest test-only test |
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
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
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
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
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
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
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