Open kirkbushell opened 4 months ago
Or better yet, just have a parameter that allows the code to exit with an error if a check doesn't pass minimum requirements.
@kirkbushell I think this is already possible. I'm using the following parameters:
--no-interaction --min-quality=$min_quality --min-complexity=$min_complexity --min-architecture=$min_architecture --min-style=$min_style
@fkandus oooh, okay I'll give that a go - ty! :)
We're looking to run phpinsights on a git commit prehook, so that if there are issues with a file about to be committed, the commit is prevented. This is currently not possible, so ideally adding an additional format could be a way of doing this - adding a new format called "boolean" which when run in the console and exits with an error. This can then be picked up in scripts and prevent the commit from occurring.
It is our view that this is quite important in order to prevent issues before they even reach the codebase. --fix is not an option here, as we're also looking to help educate our team, not just sweep any issues under the rug (it would also be quite odd for engineers to see that their code had changed once they viewed it on github).