Previously unchanged files caused a NonFatalException which allowed
the linter to skip them and move on to the next file. This was done
under the assumption that running the linter on such files was done by
mistake, since by definition they have no changed lines.
However, this behavior denies the Reporter the opportunity to make that
decision itself.
It can also be confusing when run on only unchanged files because in
those cases even with the JSON reporter, no output is produced and no
error code is set.
With this diff, unchanged files will be treated simply has having no
phpcs messages, and the Reporter can decide how best to deal with that.
Previously unchanged files caused a
NonFatalException
which allowed the linter to skip them and move on to the next file. This was done under the assumption that running the linter on such files was done by mistake, since by definition they have no changed lines.However, this behavior denies the Reporter the opportunity to make that decision itself.
It can also be confusing when run on only unchanged files because in those cases even with the JSON reporter, no output is produced and no error code is set.
With this diff, unchanged files will be treated simply has having no phpcs messages, and the Reporter can decide how best to deal with that.