Open yashpandey06 opened 2 months ago
@XiShanYongYe-Chang I've faced some challenges with code formatting as a contributor and believe this can be effectively addressed by enhancing our Makefile and automate formatting task. Specifically, I propose adding go fmt to the make verify target. This adjustment could streamline our workflow and ensure consistent code formatting.
If you find this approach promising, I'd appreciate discussing it further to work on a solution together.
Hi @yashpandey06 thanks for your feedback. For developers, you only need to ensure that the current content submitted by yourself passes through go fmt. This can be achieved by configuring in the code editor. When the file is saved, go fmt is automatically performed. Performing go fmt on the entire repository will do a lot of useless work. These are some of my thoughts.
Hi @yashpandey06 thanks for your feedback. For developers, you only need to ensure that the current content submitted by yourself passes through go fmt. This can be achieved by configuring in the code editor. When the file is saved, go fmt is automatically performed. Performing go fmt on the entire repository will do a lot of useless work. These are some of my thoughts.
@XiShanYongYe-Chang well, noted that thanks for your kind suggestion .
Title: Add
go fmt
tomake verify
Target to Ensure Code FormattingDescription:
To improve the development workflow and ensure consistent code formatting, I propose adding a step to run
go fmt
across the entire codebase within themake verify
target. This change will automatically format Go source files, helping contributors avoid committing unformatted code, reducing unnecessary commit noise, and improving the overall code quality.Motivation:
go fmt
as part ofmake verify
, we can ensure that code is consistently formatted, reducing the likelihood of linting errors related to formatting.Proposed Changes:
fmt
target to the Makefile that runsgo fmt ./...
.verify
target to include a call tomake fmt
.Updated Makefile: