From b37a91ecdd4f8ff605fdf00d6782b535d57de3e3 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sun, 24 May 2026 03:00:17 +0200 Subject: [PATCH 1/3] feat: standardize Makefile targets to directory-like naming convention Rename all Makefile targets to use tool-first directory-style grouping (e.g. docker/build, test/unit, static-analysis/lint) for alphabetical sorting and visual grouping of related recipes. Add missing standard targets: test/unit, static-analysis/lint, static-analysis/vulncheck. Update all GitHub Actions workflow files to reference the new target names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/callable-test.yaml | 2 +- .github/workflows/code-scanning.yaml | 2 +- .github/workflows/copilot-setup-steps.yml | 2 +- Makefile | 42 ++++++++++++++--------- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/workflows/callable-test.yaml b/.github/workflows/callable-test.yaml index 20a2ff2..145224f 100644 --- a/.github/workflows/callable-test.yaml +++ b/.github/workflows/callable-test.yaml @@ -52,7 +52,7 @@ jobs: unit-test-go-build-${{ runner.os }}-${{ matrix.go-version-alias }}- - name: Run unit tests with coverage - run: make unittest-json + run: make test/unit-json - name: Publish unit test results uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0 diff --git a/.github/workflows/code-scanning.yaml b/.github/workflows/code-scanning.yaml index 1f57b90..1ddf3b5 100644 --- a/.github/workflows/code-scanning.yaml +++ b/.github/workflows/code-scanning.yaml @@ -73,7 +73,7 @@ jobs: govulncheck-go-build-${{ runner.os }}- - name: Run vulnerability scan - run: make vulncheck-sarif + run: make static-analysis/vulncheck-sarif - name: Upload vulnerability SARIF if: always() diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 2556f99..878fdb6 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -50,7 +50,7 @@ jobs: go mod download -modfile tools/go.mod - name: Install golangci-lint - run: make install-lint + run: make install/lint - name: Warm up govulncheck run: go tool -modfile tools/go.mod govulncheck -version diff --git a/Makefile b/Makefile index 72005e2..a69d814 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,34 @@ GOPATH ?= $(shell go env GOPATH) GOBIN ?= $(GOPATH)/bin -unittest-json: - @mkdir -p build - @go test -v -json -coverprofile=build/coverage.out -covermode=atomic ./... -timeout 20s -failfast > build/unit-test-output.json - -coverage-report: - @go tool cover -html=build/coverage.out -o build/coverage.html - @echo "### Code Coverage: $$(go tool cover -func=build/coverage.out | awk '/^total:/{print $$3}')" +build: +@go build ./... coverage: - @go tool cover -html=build/coverage.out -o build/coverage.html - @go tool cover -func=build/coverage.out | awk 'END {print $$3}' +@go tool cover -html=build/coverage.out -o build/coverage.html +@go tool cover -func=build/coverage.out | awk 'END {print $$3}' -vulncheck-sarif: - @mkdir -p build - @go tool -modfile=./tools/go.mod govulncheck -format sarif ./... > build/govulncheck-report.sarif +coverage/report: +@go tool cover -html=build/coverage.out -o build/coverage.html +@echo "### Code Coverage: $$(go tool cover -func=build/coverage.out | awk '/^total:/{print $$3}')" -install-lint: - curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(GOBIN) v2.12.2 +install/lint: +curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(GOBIN) v2.12.2 -build: - @go build ./... +static-analysis/lint: +golangci-lint run --fix + +static-analysis/vulncheck: +@go tool -modfile=./tools/go.mod govulncheck ./... + +static-analysis/vulncheck-sarif: +@mkdir -p build +@go tool -modfile=./tools/go.mod govulncheck -format sarif ./... > build/govulncheck-report.sarif + +test/unit: +@mkdir -p build +@go test -v ./... -timeout 20s -failfast -coverprofile=build/coverage.out -covermode=atomic + +test/unit-json: +@mkdir -p build +@go test -v -json -coverprofile=build/coverage.out -covermode=atomic ./... -timeout 20s -failfast > build/unit-test-output.json From ed67159be2ca7bb1264023e415e6596c4f7aca66 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sun, 24 May 2026 03:08:33 +0200 Subject: [PATCH 2/3] fix: correct tab indentation in Makefile recipes Make requires tab characters for recipe lines. Previous commit used spaces, causing 'missing separator' errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index a69d814..f64cf7d 100644 --- a/Makefile +++ b/Makefile @@ -2,33 +2,33 @@ GOPATH ?= $(shell go env GOPATH) GOBIN ?= $(GOPATH)/bin build: -@go build ./... + @go build ./... coverage: -@go tool cover -html=build/coverage.out -o build/coverage.html -@go tool cover -func=build/coverage.out | awk 'END {print $$3}' + @go tool cover -html=build/coverage.out -o build/coverage.html + @go tool cover -func=build/coverage.out | awk 'END {print $$3}' coverage/report: -@go tool cover -html=build/coverage.out -o build/coverage.html -@echo "### Code Coverage: $$(go tool cover -func=build/coverage.out | awk '/^total:/{print $$3}')" + @go tool cover -html=build/coverage.out -o build/coverage.html + @echo "### Code Coverage: $$(go tool cover -func=build/coverage.out | awk '/^total:/{print $$3}')" install/lint: -curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(GOBIN) v2.12.2 + curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(GOBIN) v2.12.2 static-analysis/lint: -golangci-lint run --fix + golangci-lint run --fix static-analysis/vulncheck: -@go tool -modfile=./tools/go.mod govulncheck ./... + @go tool -modfile=./tools/go.mod govulncheck ./... static-analysis/vulncheck-sarif: -@mkdir -p build -@go tool -modfile=./tools/go.mod govulncheck -format sarif ./... > build/govulncheck-report.sarif + @mkdir -p build + @go tool -modfile=./tools/go.mod govulncheck -format sarif ./... > build/govulncheck-report.sarif test/unit: -@mkdir -p build -@go test -v ./... -timeout 20s -failfast -coverprofile=build/coverage.out -covermode=atomic + @mkdir -p build + @go test -v ./... -timeout 20s -failfast -coverprofile=build/coverage.out -covermode=atomic test/unit-json: -@mkdir -p build -@go test -v -json -coverprofile=build/coverage.out -covermode=atomic ./... -timeout 20s -failfast > build/unit-test-output.json + @mkdir -p build + @go test -v -json -coverprofile=build/coverage.out -covermode=atomic ./... -timeout 20s -failfast > build/unit-test-output.json From b5ec188a699e276b4ab7d406e5b94f8488390299 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sun, 24 May 2026 03:21:52 +0200 Subject: [PATCH 3/3] refactor: convert hyphenated sub-targets to slash-separated paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each logical segment of an action is now separated by a slash, e.g. test/unit-json → test/unit/json, static-analysis/vulncheck-sarif → static-analysis/vulncheck/sarif. This keeps naming consistent and avoids long hyphenated names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/callable-test.yaml | 4 ++-- .github/workflows/code-scanning.yaml | 2 +- Makefile | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/callable-test.yaml b/.github/workflows/callable-test.yaml index 145224f..829c435 100644 --- a/.github/workflows/callable-test.yaml +++ b/.github/workflows/callable-test.yaml @@ -52,7 +52,7 @@ jobs: unit-test-go-build-${{ runner.os }}-${{ matrix.go-version-alias }}- - name: Run unit tests with coverage - run: make test/unit-json + run: make test/unit/json - name: Publish unit test results uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0 @@ -67,7 +67,7 @@ jobs: if: always() run: | if [ -f build/coverage.out ]; then - make coverage-report | grep "^### Code Coverage:" >> "$GITHUB_STEP_SUMMARY" || true + make coverage/report | grep "^### Code Coverage:" >> "$GITHUB_STEP_SUMMARY" || true fi - name: Upload coverage report diff --git a/.github/workflows/code-scanning.yaml b/.github/workflows/code-scanning.yaml index 1ddf3b5..51e37ce 100644 --- a/.github/workflows/code-scanning.yaml +++ b/.github/workflows/code-scanning.yaml @@ -73,7 +73,7 @@ jobs: govulncheck-go-build-${{ runner.os }}- - name: Run vulnerability scan - run: make static-analysis/vulncheck-sarif + run: make static-analysis/vulncheck/sarif - name: Upload vulnerability SARIF if: always() diff --git a/Makefile b/Makefile index f64cf7d..a01c0eb 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ static-analysis/lint: static-analysis/vulncheck: @go tool -modfile=./tools/go.mod govulncheck ./... -static-analysis/vulncheck-sarif: +static-analysis/vulncheck/sarif: @mkdir -p build @go tool -modfile=./tools/go.mod govulncheck -format sarif ./... > build/govulncheck-report.sarif @@ -29,6 +29,6 @@ test/unit: @mkdir -p build @go test -v ./... -timeout 20s -failfast -coverprofile=build/coverage.out -covermode=atomic -test/unit-json: +test/unit/json: @mkdir -p build @go test -v -json -coverprofile=build/coverage.out -covermode=atomic ./... -timeout 20s -failfast > build/unit-test-output.json