https://github.com/spacetab-io/makefiles
Makefiles includes collection
https://github.com/spacetab-io/makefiles
Last synced: about 1 month ago
JSON representation
Makefiles includes collection
- Host: GitHub
- URL: https://github.com/spacetab-io/makefiles
- Owner: spacetab-io
- License: mit
- Created: 2021-03-06T07:59:09.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T19:39:32.000Z (over 1 year ago)
- Last Synced: 2025-02-14T22:13:52.683Z (3 months ago)
- Language: Makefile
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# makefiles
Makefiles includes collection## golang
Collection of makefiles includes for golang project.
### linter.mk
Adds commands to lint golang project with golangci-lint with [custom config](https://github.com/spacetab-io/docker-images-golang/blob/master/linter/.golangci.yml).
Add this lines to your Makefile and run `make lint`:
```Makefile
# ----
## LINTER stuff startlinter_include_check:
@[ -f linter.mk ] && echo "linter.mk include exists" || (echo "getting linter.mk from github.com" && curl -sO https://raw.githubusercontent.com/spacetab-io/makefiles/master/golang/linter.mk).PHONY: lint
lint: linter_include_check
@make -f linter.mk go_lint## LINTER stuff end
# ----
```Don't forget to add `linter.mk` and `.golangci*.yml` to project `.gitignore` file
### tests.mk
Adds commands to test golang project.
Add this lines to your Makefile and run `make tests`:
```Makefile
# ----
## TESTS stuff starttests_include_check:
@[ -f tests.mk ] && echo "tests.mk include exists" || (echo "getting tests.mk from github.com" && curl -sO https://raw.githubusercontent.com/spacetab-io/makefiles/master/golang/tests.mk)tests: tests_include_check
@make -f tests.mk go_tests
.PHONY: teststests_html: tests_include_check
@make -f tests.mk go_tests_html
@open coverage.html
.PHONY: tests_html## TESTS stuff end
# ----
```Don't forget to add `tests.mk` to project `.gitignore` file