mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 10:36:53 +00:00
deprecate the --diff option
This commit is contained in:
parent
a08fc4be98
commit
e6579239af
3 changed files with 11 additions and 2 deletions
|
|
@ -238,6 +238,11 @@ Options and their Descriptions
|
|||
|
||||
:ref:`Go back to index <top>`
|
||||
|
||||
.. warning::
|
||||
|
||||
Due to hiding potential errors, this option is deprecated and will be
|
||||
removed in a future version.
|
||||
|
||||
Use the unified diff provided on standard in to only check the modified
|
||||
files and report errors included in the diff.
|
||||
|
||||
|
|
|
|||
|
|
@ -191,6 +191,10 @@ class Application:
|
|||
|
||||
self.running_against_diff = self.options.diff
|
||||
if self.running_against_diff:
|
||||
LOG.warning(
|
||||
"the --diff option is deprecated and will be removed in a "
|
||||
"future version."
|
||||
)
|
||||
self.parsed_diff = utils.parse_unified_diff()
|
||||
if not self.parsed_diff:
|
||||
self.exit()
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ def register_default_options(option_manager):
|
|||
add_option(
|
||||
"--diff",
|
||||
action="store_true",
|
||||
help="Report changes only within line number ranges in the unified "
|
||||
"diff provided on standard in by the user.",
|
||||
help="(DEPRECATED) Report changes only within line number ranges in "
|
||||
"the unified diff provided on standard in by the user.",
|
||||
)
|
||||
|
||||
add_option(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue