Skip to content

chore: make fmt a format check, update go-ci.yml to @v2 - #16

Merged
cboone merged 3 commits into
mainfrom
chore/go-ci-v2
Mar 9, 2026
Merged

chore: make fmt a format check, update go-ci.yml to @v2#16
cboone merged 3 commits into
mainfrom
chore/go-ci-v2

Conversation

@cboone

@cboone cboone commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change make fmt from write mode (go fmt ./...) to a format check that exits non-zero when files need formatting
  • Add make format target for write-mode formatting
  • Update go-ci.yml reference from @v1 to @v2

go-ci.yml v2 runs make fmt as a format check. The convention is that fmt checks and format writes.

Test plan

  • CI passes with go-ci.yml@v2
  • make fmt exits 0 on clean code, exits 1 after breaking formatting
  • make format still formats code

Copilot AI review requested due to automatic review settings March 9, 2026 22:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes make fmt from a write-mode formatter (go fmt ./...) to a format check that exits non-zero when files need formatting, adds a new make format target for write-mode formatting, and updates the CI workflow to use go-ci.yml@v2 which relies on this check convention.

Changes:

  • make fmt now runs gofmt -l . to detect unformatted files and exits 1 if any are found
  • New make format target added to perform actual formatting via go fmt ./...
  • CI workflow updated from go-ci.yml@v1 to go-ci.yml@v2

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Makefile Split fmt into a check-only target and a new format write target; updated help text
.github/workflows/ci.yml Updated reusable workflow reference from @v1 to @v2

You can also share your feedback on Copilot code review. Take the survey.

Comment thread Makefile Outdated
Comment thread Makefile
@cboone

cboone commented Mar 9, 2026

Copy link
Copy Markdown
Owner Author

Copilot Feedback Resolved

Addressed 2 Copilot review comment(s) with code changes:

File Category Action
Makefile:39 Valid Removed redundant ## inline comments from fmt and format
Makefile:35 Incorrect Cross-repo convention; added Copilot instruction

@cboone
cboone merged commit 0d764dc into main Mar 9, 2026
5 checks passed
@cboone
cboone deleted the chore/go-ci-v2 branch March 9, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants