mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-01 03:26:52 +00:00
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:
parent
c2ef3c2ce0
commit
9139d11760
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue