Understand Mago Linter behavior in GrumPHP
v2.xThe Mago Linter task has specific behaviors depending on the execution context:
- Default Mode: The task always runs in
--fix --dry-runmode. It previews automatic fixes without modifying files and fails if issues are found. - Git Pre-commit: When running in a
git pre-commitcontext, only staged files are linted (--staged). - Run Context: When running via the
runcommand, all files are linted. - Auto-fixing: If the task fails, GrumPHP will offer to re-run the task with
--fixapplied based on your configuredfix-mode.