[TASK] Streamline the code checker and fixer configuration#1535
Conversation
- always check and fix the `bin/`, `config/`, `src/` and `test/` directories - sort the directories when provided to a tool - make the rector command explicit
JakeQZ
left a comment
There was a problem hiding this comment.
It seems we missed the odd directory for the tool commands.
I like the alphabetical reordering, and the changes look good.
But I need to know why process is added to the rector command, and can't find the info.
| "check:php:codesniffer": "phpcs --standard=config/phpcs.xml bin config src tests", | ||
| "check:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin config src tests", | ||
| "check:php:lint": "parallel-lint bin config src tests", | ||
| "check:php:rector": "rector process --no-progress-bar --dry-run --config=config/rector.php", |
There was a problem hiding this comment.
I'd like to know why process is now needed on the command line, when it wasn't before.
I've looked at the documentation, which alludes to it with "run process command with...", but provides no links, and does not explain what the commands are, how they work, or why they might be needed.
| "fix:php:rector": "rector --config=config/rector.php", | ||
| "fix:php:codesniffer": "phpcbf --standard=config/phpcs.xml bin config src tests", | ||
| "fix:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix bin config src tests", | ||
| "fix:php:rector": "rector process --config=config/rector.php", |
This is the command for Rector to run. It's the default command (so omitting it will still get Rector to run it), but explicitly providing it makes it easier for the human reader to know what will happen. |
JakeQZ
left a comment
There was a problem hiding this comment.
This is the command for Rector to run. It's the default command (so omitting it will still get Rector to run it)
Where are you finding the documentation? I can't find anything saying that.
I'll trust what you say.
That's from my experience: "Rector processes files even when I omit the |
Where's that from? May as well include the |
bin/,config/,src/andtest/directories