chore: make fmt a format check, update go-ci.yml to @v2 - #16
Merged
Conversation
There was a problem hiding this comment.
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 fmtnow runsgofmt -l .to detect unformatted files and exits 1 if any are found- New
make formattarget added to perform actual formatting viago fmt ./... - CI workflow updated from
go-ci.yml@v1togo-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.
Owner
Author
Copilot Feedback ResolvedAddressed 2 Copilot review comment(s) with code changes:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make fmtfrom write mode (go fmt ./...) to a format check that exits non-zero when files need formattingmake formattarget for write-mode formatting@v1to@v2go-ci.yml v2 runs
make fmtas a format check. The convention is thatfmtchecks andformatwrites.Test plan
make fmtexits 0 on clean code, exits 1 after breaking formattingmake formatstill formats code