Skip to content

Improved make help command - Show group#448

Open
Xakki wants to merge 1 commit intoyiisoft:masterfrom
Xakki:master
Open

Improved make help command - Show group#448
Xakki wants to merge 1 commit intoyiisoft:masterfrom
Xakki:master

Conversation

@Xakki
Copy link

@Xakki Xakki commented Feb 23, 2026

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

Its like this

$ make

Usage:
  make <target>

Development
  build                      Build docker images
  up                         Up the dev environment
  down                       Down the dev environment
  stop                       Stop the dev environment
  clear                      Remove development docker containers and volumes
  shell                      Get into container shell

Tools
  yii                        Execute Yii command
  composer                   Run Composer
  rector                     Run Rector
  cs-fix                     Run PHP CS Fixer

Tests and analysis
  codecept                   Run Codeception
  psalm                      Run Psalm
  composer-dependency-analyser  Run Composer Dependency Analyser

Production
  prod-build                 PROD | Build an image
  prod-push                  PROD | Push image to repository
  prod-deploy                PROD | Deploy to production

Other
  help                       This help.

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.96%. Comparing base (baafb50) to head (fbff705).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #448   +/-   ##
=========================================
  Coverage     76.96%   76.96%           
  Complexity       29       29           
=========================================
  Files            11       11           
  Lines           178      178           
=========================================
  Hits            137      137           
  Misses           41       41           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

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

Add line to changelog

@vjik vjik requested a review from a team February 24, 2026 07:43
@vjik vjik added the status:code review The pull request needs review. label Feb 24, 2026
@samdark samdark requested a review from Copilot February 24, 2026 20:11
Copy link

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 pull request enhances the make help command to display targets organized by category groups, improving the usability of the Makefile's self-documentation. The changes parse section headers from the Makefile (Development, Tools, Tests and analysis, Production, Other) and group related targets under these headers in the help output.

Changes:

  • Updated the make help target with a new AWK script that parses section headers and groups targets
  • Simplified docker/.env by removing redundant comment line markers around section headers

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Makefile Enhanced help target with AWK script to display categorized groups of targets, replacing the simpler single-line AWK command with a multi-pattern script that parses section headers and formats output with colored, grouped display
docker/.env Removed extra # comment lines surrounding section headers (Development, Production) for cleaner formatting

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

@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
endif
# Output the help for each task
help: ## This help.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

There's an extra space after the colon in help: ##. While this doesn't affect functionality, it's inconsistent with other targets in the Makefile which use a single space (e.g., build: ##, up: ##, etc.). Consider changing help: ## to help: ## for consistency.

Suggested change
help: ## This help.
help: ## This help.

Copilot uses AI. Check for mistakes.
# Output the help for each task
help: ## This help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} \
/^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } \
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The regex pattern /^[a-zA-Z_-]+:.*?##/ uses the non-greedy quantifier ? which is not standard in AWK's ERE (Extended Regular Expressions). This will cause the pattern to be interpreted as a literal ? character, making it match targets that have a literal ? in their definition, which is not the intended behavior. The pattern should be /^[a-zA-Z_-]+:.*##/ without the ? quantifier.

Suggested change
/^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } \
/^[a-zA-Z_-]+:.*##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } \

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants