Revert "cli: analyzers: Support `cros format --head` and file guessing."
This reverts commit 5928f867d8f4f61b16091c62a3d4d14140960770.
Reason for revert: b/291018636
Original change's description:
> cli: analyzers: Support `cros format --head` and file guessing.
>
> Implement by inheriting from analyzers.AnalyzerCommand.
>
> `cros format --head` is the equivalent of
> cros format --commit HEAD
>
> The inheritance additionally picks up behaviour added for
> determining files affected by that CL, and formatting those when
> no files are provided on the command line.
>
> BUG=b:287389061
> TEST=Manual
>
> Change-Id: I9f4c2fc9ad6518b13e761f620a63dd74ece253c3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4644789
> Commit-Queue: Trent Apted <tapted@chromium.org>
> Reviewed-by: Mike Frysinger <vapier@chromium.org>
> Tested-by: Trent Apted <tapted@chromium.org>
BUG=b:287389061, b:291018636
Change-Id: I6b22b98952f4ee744d4ff37720a5521ddfa06102
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4680612
Commit-Queue: Trent Apted <tapted@chromium.org>
Tested-by: Li-Yu Yu <aaronyu@google.com>
Owners-Override: Sung-Chi Li <lschyi@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Commit-Queue: Yi Chou <yich@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
diff --git a/cli/analyzers.py b/cli/analyzers.py
index 815eced..415a0bb 100644
--- a/cli/analyzers.py
+++ b/cli/analyzers.py
@@ -43,9 +43,6 @@
class AnalyzerCommand(ABC, command.CliCommand):
"""Shared argument parsing for cros analyzers (fix, lint, format)."""
- # Additional aliases to offer for the "--inplace" option.
- inplace_option_aliases = []
-
use_dryrun_options = True
# Override base class property to use path filter options.
use_filter_options = True
@@ -71,10 +68,10 @@
help="Write to stdout",
)
parser.add_argument(
- *(["-i", "--inplace"] + cls.inplace_option_aliases),
+ "-i",
+ "--inplace",
default=True,
action="store_true",
- dest="inplace",
help="Fix files inplace (default)",
)
parser.add_argument(