Skip to content

Commit 95d1a40

Browse files
christiangdaclaude
andcommitted
chore: add betteralign targets to Makefile
Add go-betteralign and install-betteralign make targets for optimizing struct field alignment using betteralign tool. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 84abd1e commit 95d1a40

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ go-vet: ## Vet go code
102102
@printf "👉 Vet go code...\n"
103103
$(call exec_cmd, go vet ./... )
104104

105+
.PHONY: go-betteralign
106+
go-betteralign: install-betteralign ## Align go code with betteralign
107+
@printf "👉 Aligning go code with betteralign...\n"
108+
$(call exec_cmd, betteralign -apply ./... )
109+
105110
.PHONY: go-generate
106111
go-generate: ## Generate go code
107112
@printf "👉 Generating go code...\n"
@@ -343,6 +348,13 @@ container-publish-aws-ecr: ## Publish the container image to AWS ECR
343348
) \
344349
)
345350

351+
###############################################################################
352+
##@ Install Commands
353+
.PHONY: install-betteralign
354+
install-betteralign: ## Install betteralign for code alignment (https://github.com/dkorunic/betteralign)
355+
@printf "👉 Installing betteralign...\n"
356+
$(call exec_cmd, go install github.com/dkorunic/betteralign/cmd/betteralign@latest )
357+
346358
###############################################################################
347359
##@ Support Commands
348360
.PHONY: clean

0 commit comments

Comments
 (0)