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

Cache svn previous file by last changed version #46

Closed sirbrillig closed 3 years ago

sirbrillig commented 3 years ago

Previously we were invalidating the whole cache for svn files whenever the svn revision changed, but this is overly broad. Most files of a repo will not change when the revision changes, and we should be able to use their cached versions.

This PR changes the cache so that it uses the file's last changed revision as the hash for that file, and does not clear the whole cache based on revision.