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

Only run orig file PHPCS linting when the new version has lint issues #51

Closed david-binda closed 2 years ago

david-binda commented 2 years ago

When there are no linting issues reported by PHPCS in the new file, there is no point in checking the orig verion, since we would not report any issues anyway.

This should speed up the phpcs-changed for files w/o lint issues.

props to @sirbrillig for the idea.

david-binda commented 2 years ago

Yep, good call! I have added a new test for git workflow, and adjusted existing one for svn workflow. I made sure the test are properly failing w/o the logic change from this PR, and are passing when the change is applied.

sirbrillig commented 2 years ago

Thank you!