Closed david-binda closed 2 years ago
I like the approach. I don't mind the overloading of the 'standard' key. Anyway, if I'm thinking about this correctly the worst case scenario is that the cache is invalidated too often, which is not a terrible problem.
Passing in the
--warning-severity
and--error-severity
flags to phpcs is rather straightforward, however we need to take into consideration the caching layer.It currently uses the standard as a cache key, and it definitelly should take into consideration different severity settings. To make sure the existing cache is backward compatible with the one created by previous version of phpcs-changed, we can map the default severity ('5') to a standard run w/o severity settings.
I think that simply appending the warning and error severity value to the standard used in the key can make it work.
fixes #56