Add make fmt target for manual code formatting#32
Conversation
Co-authored-by: rustyeddy <2903425+rustyeddy@users.noreply.github.com>
Co-authored-by: rustyeddy <2903425+rustyeddy@users.noreply.github.com>
Co-authored-by: rustyeddy <2903425+rustyeddy@users.noreply.github.com>
Co-authored-by: rustyeddy <2903425+rustyeddy@users.noreply.github.com>
|
@copilot whoops I made a mistake. We don't want to have pipeline runs rewrite to a branch. I should run the fmt outside of the ci/cd pipeline. Can you remove the formatting from the pipeline? |
Co-authored-by: rustyeddy <2903425+rustyeddy@users.noreply.github.com>
Done! I've removed the CI workflow that auto-committed formatting changes (commit 215eabb). The |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a make fmt target to enable manual code formatting using gofmt with simplifications, and applies the formatting to existing code. The PR title focuses on the manual formatting capability, though the description also mentions CI automation that isn't present in the actual changes.
Key Changes:
- Updated
make fmttarget to usegofmt -s -w .instead ofgo fmt ./..., enabling code simplifications - Applied formatting fixes to remove unnecessary blank identifiers and trailing whitespace
- Changes align with repository conventions documented in custom instructions
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Makefile | Changed fmt target from go fmt ./... to gofmt -s -w . to enable simplifications and explicit file-based formatting |
| cmd/cmd_ticker.go | Removed unnecessary blank identifier in range loop (standard gofmt -s simplification) |
| test/integration/integration_test.go | Removed trailing whitespace from closing brace |
Adds a
make fmttarget to enable manual code formatting withgofmt.Changes
fmttarget runninggofmt -s -w .Usage
Developers can now run
make fmtmanually before committing to format all Go code according to standard Go formatting conventions:This allows developers to maintain consistent code formatting without automated CI workflows that rewrite branches.
Testing
make vetpassesmake fmtsuccessfully formats all Go filesOriginal prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.