style: restructure makefile #4

Merged
mvhutz merged 6 commits from style/makefile-check into main 2026-03-19 00:14:55 +00:00
Owner

Currently, the Makefile is not well structured, and does not follow best practices. With the help of checkmake, the Makefile can be forced to follow them.

Decisions

  • Added CI job lint-makefile, which forces the Makefile to conform to standards.
  • The make help was set as the default target. This is common practice in the industry.
  • The make help uses grep | awk to create a command table from ## comments after each target. It seems a bit icky, but it is something that Docker, Kubernetes, and Helm all do.
Currently, the `Makefile` is not well structured, and does not follow best practices. With the help of [`checkmake`](https://github.com/checkmake/checkmake), the Makefile can be forced to follow them. ### Decisions - Added CI job `lint-makefile`, which forces the Makefile to conform to standards. - The `make help` was set as the default target. This is common practice in the industry. - The `make help` uses `grep` | `awk` to create a command table from `##` comments after each target. It seems a bit icky, but it is something that Docker, Kubernetes, and Helm all do.
mvhutz added 4 commits 2026-03-18 23:31:58 +00:00
- Added `checkmake` to enforce good `Makefile` format.
- Added `help`, `test`, `lint-markdown`, `lint`, `clean`, and `all` targets.
- Added `install` target.
- Added target comments to streamline `help` command.
Runs all `lint-*` jobs.
refactor: use make in CI, pull module in make docs
Some checks failed
CI / Unit Tests (pull_request) Failing after 8s
CI / Golang Lint (pull_request) Successful in 1m7s
CI / Fuzz Tests (pull_request) Successful in 1m19s
CI / Mutation Tests (pull_request) Successful in 1m54s
5c019baa78
Instead of duplicating test logic in both the CI and the Makefile, I made the CI call the Makefile. Also, updated `make docs` so it dynamically pulls the module name from `go list -m`.
mvhutz added 1 commit 2026-03-18 23:34:58 +00:00
fix: unit-test CI job calls 'name' instead of make
All checks were successful
CI / Unit Tests (pull_request) Successful in 12s
CI / Golang Lint (pull_request) Successful in 15s
CI / Mutation Tests (pull_request) Successful in 32s
CI / Fuzz Tests (pull_request) Successful in 1m21s
72a8a9c4f7
I made a typo.
mvhutz added 1 commit 2026-03-19 00:01:30 +00:00
style: rename CI jobs to match Makefile targets
All checks were successful
CI / Unit Tests (pull_request) Successful in 16s
CI / Go Lint (pull_request) Successful in 25s
CI / Mutation Tests (pull_request) Successful in 35s
CI / Fuzz Tests (pull_request) Successful in 45s
51930a7cbb
mvhutz changed title from WIP: style: restructure makefile to style: restructure makefile 2026-03-19 00:13:41 +00:00
mvhutz merged commit ece10585a5 into main 2026-03-19 00:14:55 +00:00
mvhutz deleted branch style/makefile-check 2026-03-19 00:14:55 +00:00
Sign in to join this conversation.