Skip to content

Conversation

@metachris
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 19, 2025 08:39
Copy link
Contributor

Copilot AI left a comment

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 enhances the make lint command to fail when code formatting issues are detected, rather than just displaying them. Previously, gofmt and gofumpt would only print formatting differences without causing the lint target to fail.

Key Changes:

  • Modified gofmt and gofumpt commands to capture output and exit with error code 1 if formatting issues are found

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +33 to +34
output=$$(gofmt -d -s .) && [ -z "$$output" ] || { echo "$$output"; exit 1; }
output=$$(gofumpt -d -extra .) && [ -z "$$output" ] || { echo "$$output"; exit 1; }
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The shell logic for capturing and checking formatter output is duplicated. Consider extracting this pattern into a shell function or variable at the top of the Makefile to improve maintainability and make future formatter additions easier.

Copilot uses AI. Check for mistakes.
@ferranbt ferranbt merged commit 88cfbf6 into main Dec 19, 2025
8 checks passed
@ferranbt ferranbt deleted the make-fmt branch December 19, 2025 08:57
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