Closed larsroettig closed 5 years ago
I can confirm that GrumPHP also helped us with getting better commits. Especially it's motivating because it shortens the feedback loop (you don't need to wait for a failing build to get feedback) and helps to not forgetting basic checks.
* what should checked before commit
I didn't use phpmnd
yet so I cannot tell and we might have to skip the phpversion
check if this repository support PHP 5.6 (unless we want to specify that). For the other checks I'm sure they would provide value.
if can use this tool for only this repo
It might be a good test project for Magento to find out if it's suitable for other repos too.
@lenaorobei can you review this we should add this to architecture meeting on Wednesday.
@larsroettig sure, adding to the meeting notes.
@larsroettig nice initiative, it was a suggested replacement for abandoned composer package used to implement git hook previously :)
I would revisit config a lot thought, git_blacklist
for instance could be replaced with ForbiddenFunctions
sniff, whitelist_patterns: - /^src\/app\/(.*)/
seems incomplete, phtml
files must be checked too.
@orlangur ForbiddenFunctions we can add this and remove git_blacklist
it is only a recommendation.
@larsroettig as per architects discussion this issue looks like more global question than just the coding standard. Could you please move this proposal to magento/architecture repository?
This issue was moved to magento/architecture#90
We should add as grumphp for checking the quality of commits.
Sample Config:
We using this tool for more than one year in our projects. We getting better commits and lower rejection rate of Pull Requests.
Info: https://www.integer-net.com/magento-2-automatic-code-quality-check-with-grumphp/
To discuss: