Exit early if the diff is empty

In case the provided diff is empty, do not run checks against any files,
simply exit.

Closes #226
This commit is contained in:
Ian Cordasco 2016-11-08 21:38:50 -06:00
parent c2ef3c2ce0
commit 9139d11760
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A

View file

@ -167,6 +167,8 @@ class Application(object):
self.running_against_diff = self.options.diff
if self.running_against_diff:
self.parsed_diff = utils.parse_unified_diff()
if not self.parsed_diff:
self.exit()
self.check_plugins.provide_options(self.option_manager, self.options,
self.args)