-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Integrate with gate CLI for pre-commit quality validation.
Commands
commit check
commit check # Run gate checks on staged files
commit check --quick # Fast checks only (lint, format)
commit check --fix # Auto-fix issuescommit --gate
commit -a -m "feat: X" --gate # Run gate before commitIntegration Flow
1. Stage files
2. commit check (optional but recommended)
3. Gate runs: pint, phpstan, tests on affected files
4. Pass? → Commit
5. Fail? → Show errors, block commit
Configuration
# .commit.json or composer.json
{
"commit": {
"gate": {
"enabled": true,
"quick-only": false,
"auto-fix": true
}
}
}Gate Integration
// Call gate CLI
$result = Process::run('gate check --files=' . implode(',', $stagedFiles));
if ($result->failed()) {
$this->error('Gate checks failed. Fix issues before committing.');
return self::FAILURE;
}Pre-commit Hook (Optional)
commit hook install # Install git pre-commit hook
commit hook remove # Remove hookHook calls commit check automatically.
Metadata
Metadata
Assignees
Labels
No labels