sirbrillig / phpcs-changed

🐘 Run phpcs on files and only report new warnings/errors compared to the previous version.
MIT License
31 stars 11 forks source link

Move hash, phpcs, and root git commands to ShellOperator #75

Closed sirbrillig closed 1 year ago

sirbrillig commented 1 year ago

This moves a bunch of git commands to the ShellOperator interface so they can be customized for a different OS. Specifically this moves:

This also removes the initial validation of the git file's existence in the repo since that can be handled when we try to fetch the file's full path.

Since this increases the number of times we get the git file's full path, we also cache the full path for the lifetime of the script.

This is part of https://github.com/sirbrillig/phpcs-changed/issues/73