Add make fmt target and fix gofumpt formatting

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-03-25 11:48:34 +01:00
parent c04d9314d3
commit 3f28aa3614
2 changed files with 11 additions and 7 deletions

View File

@@ -49,6 +49,10 @@ air: ## Install air for hot reload.
dev: air ## run the application with hot reload dev: air ## run the application with hot reload
air --build.cmd "make build" --build.bin ./gitea-mcp air --build.cmd "make build" --build.bin ./gitea-mcp
.PHONY: fmt
fmt: ## format Go code with gofumpt
$(GO) run $(GOFUMPT_PACKAGE) -w .
.PHONY: lint .PHONY: lint
lint: lint-go ## lint everything lint: lint-go ## lint everything

View File

@@ -304,13 +304,13 @@ func Test_mergePullRequestFn_newParams(t *testing.T) {
req := mcp.CallToolRequest{ req := mcp.CallToolRequest{
Params: mcp.CallToolParams{ Params: mcp.CallToolParams{
Arguments: map[string]any{ Arguments: map[string]any{
"owner": owner, "owner": owner,
"repo": repo, "repo": repo,
"index": float64(index), "index": float64(index),
"merge_style": "merge", "merge_style": "merge",
"force_merge": true, "force_merge": true,
"merge_when_checks_succeed": true, "merge_when_checks_succeed": true,
"head_commit_id": "abc123", "head_commit_id": "abc123",
}, },
}, },
} }