mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
rename must-match-git-diff to shorter and easier to write match-git-diff
This commit is contained in:
parent
73dff9bdc4
commit
0eceb8a607
@ -203,10 +203,14 @@ parameters:
|
||||
|
||||
### Limit Execution to Changed Files
|
||||
|
||||
Execution can be limited to changed files using the `process` option `--must-match-git-diff`.
|
||||
Execution can be limited to changed files using the `process` option `--match-git-diff`.
|
||||
This option will filter the files included by the configuration, creating an intersection with the files listed in `git diff`.
|
||||
|
||||
This option is useful in CI.
|
||||
```bash
|
||||
vendor/bin/rector process src --match-git-diff
|
||||
```
|
||||
|
||||
This option is useful in CI with pull-requests that only change few files.
|
||||
|
||||
## 3 Steps to Create Your Own Rector
|
||||
|
||||
|
@ -56,7 +56,7 @@ final class Configuration
|
||||
{
|
||||
$this->isDryRun = (bool) $input->getOption(Option::OPTION_DRY_RUN);
|
||||
$this->hideAutoloadErrors = (bool) $input->getOption(Option::HIDE_AUTOLOAD_ERRORS);
|
||||
$this->mustMatchGitDiff = (bool) $input->getOption(Option::MUST_MATCH_GIT_DIFF);
|
||||
$this->mustMatchGitDiff = (bool) $input->getOption(Option::MATCH_GIT_DIFF);
|
||||
$this->showProgressBar = $this->canShowProgressBar($input);
|
||||
|
||||
$this->setRule($input->getOption(Option::OPTION_RULE));
|
||||
|
@ -69,5 +69,5 @@ final class Option
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const MUST_MATCH_GIT_DIFF = 'must-match-git-diff';
|
||||
public const MATCH_GIT_DIFF = 'match-git-diff';
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ final class ProcessCommand extends AbstractCommand
|
||||
);
|
||||
|
||||
$this->addOption(
|
||||
Option::MUST_MATCH_GIT_DIFF,
|
||||
Option::MATCH_GIT_DIFF,
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'Execute only on file matching the git diff.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user