Open xipasduarte opened 5 months ago
A Proposal for the actual commands and restructuring.
We should add something that facilitates the CLI maintenance. Ideally something in PHP, to keep with the environment (Laravel Zero).
The CLI should include the following commands:
init
Initializes the library fully with a guided aid (interactive) or accepting flags to speedup. This would do the following:
.php-pre-commit/
)run
Executes PHPCS and compares the diffs with support for what exists today.
hook
Adds the run
command to the pre-commit
hook. Also checks to see if the hook command is running in certain composer scripts to make sure it's always there.
setup
Downloads and activates all the standards that are specified for a given base (WordPress, Laravel).
Is your feature request related to a problem? Please describe. Currently the users are required to configure their standard manually, dealing with decisions that make it hard to go from
composer require ...
to codding with standard.Describe the solution you'd like Instead of recommending that the user be on her own, we should add commands that install what is required for the standard approach to PHPCS on a given framework, library, etc.. The commands will replace the existing docs and we'd need a unified interface to add support for other frameworks.
Describe alternatives you've considered The current approach was considered, as a lower maintenance, but it pushes the burden to the user. We could be better at it, effectively improving the DX while using
ph-pre-commit
.Additional context None.