Fix golangci-lint errcheck warnings; add make fixstyle
errcheck flagged six unchecked Close() calls. The production write path in indexgen.ProcessDir now closes the index file explicitly after Execute and surfaces the close error so a deferred flush failure isn't lost; tests use _ = f.Close() since they don't care. Also adds a 'make fixstyle' target that runs gofmt -w over the tree, matching the convention used elsewhere. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ LDFLAGS := -s -w \
|
||||
# beyond switching net/dns to the pure-Go resolver.
|
||||
export CGO_ENABLED := 0
|
||||
|
||||
.PHONY: help all build build-amd64 build-arm64 test pkg-deb fmt vet lint check clean
|
||||
.PHONY: help all build build-amd64 build-arm64 test pkg-deb fmt fixstyle vet lint check clean
|
||||
|
||||
help: ## Show this help
|
||||
@printf "Usage: make <target>\n\nTargets:\n"
|
||||
@@ -45,6 +45,9 @@ pkg-deb: build-amd64 build-arm64 ## Build .deb packages for amd64 and arm64
|
||||
fmt: ## go fmt everything
|
||||
go fmt ./...
|
||||
|
||||
fixstyle: ## Reformat the entire tree with gofmt
|
||||
gofmt -w .
|
||||
|
||||
vet: ## go vet everything
|
||||
go vet ./...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user