Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Optimize Makefile for Improved Performance and Usability #375

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

cubxxw
Copy link
Contributor

@cubxxw cubxxw commented Apr 3, 2024

Key Changes

  • Immediate Variable Assignment: Changed VETPACKAGES and GOFILES to use immediate assignment (:=) to avoid re-evaluation of shell commands on each reference, enhancing performance.
  • Simplified fmt Command: Updated the fmt target to format all Go files in the project directory at once instead of individually. This approach is not only more efficient but also simplifies the command.
  • Unified VETPACKAGES Usage: Standardized the exclusion of /vendor/ and /examples/ directories across both the vet and test targets to maintain consistency and reduce redundancy.
  • Added all Target: Introduced an all target as the default when running make without specific targets. This target sequentially runs fmt, vet, and test, providing a comprehensive check with a single command.
  • Introduced help Target: Added a help target that dynamically generates a help message from comments in the Makefile. This feature aids new users and contributors by providing quick access to target documentation.

@askuy askuy merged commit 59c6238 into gotomicro:master Apr 3, 2024
1 of 2 checks passed
@cubxxw cubxxw deleted the patch-1 branch April 3, 2024 10:43
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