Linux command
grumphp 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Initialize GrumPHP
grumphp configure
Run all tasks
grumphp run
Run specific task
grumphp run --tasks=[phpcs]
Check git hooks
grumphp git:init
Pre-commit check
grumphp git:pre-commit
说明
GrumPHP is a PHP code quality tool that runs checks on git commits. It enforces coding standards by running tasks like PHPStan, PHP_CodeSniffer, and PHPUnit before allowing commits. The tool integrates with git hooks to prevent commits that fail quality checks. It is configurable via a grumphp.yml file in the project root.
参数
- configure
- Initialize configuration.
- run
- Execute all configured tasks.
- git:init
- Install git hooks.
- git:pre-commit
- Run pre-commit tasks.
- --tasks _TASKS_
- Specify tasks to run.
- --help
- Display help information.
FAQ
What is the grumphp command used for?
GrumPHP is a PHP code quality tool that runs checks on git commits. It enforces coding standards by running tasks like PHPStan, PHP_CodeSniffer, and PHPUnit before allowing commits. The tool integrates with git hooks to prevent commits that fail quality checks. It is configurable via a grumphp.yml file in the project root.
How do I run a basic grumphp example?
Run `grumphp configure` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does configure do in grumphp?
Initialize configuration.