lint_fix: fix CLI arguments use
Commit df4cd065 updated how command line arguments are parsed. However,
sys.argv[0] should be ignored (as this is the name of the program).
Remove the argument, so the default value (sys.argv[1:]) is used.
Also, use the embedded_launcher so that the help renders
as:
usage: lint_fix [-h]
instead of:
usage: usage: __soong_entrypoint_redirector__.py [-h]
Test: lint_fix --print --no-fix --check AnnotatedAidlCounter \
--lint-module AndroidUtilsLintChecker services.autofill
Change-Id: I00e3e3b70c9715e363d3448ae84bf9ff161f2306
diff --git a/tools/lint/fix/Android.bp b/tools/lint/fix/Android.bp
index 43f2122..ddacf57 100644
--- a/tools/lint/fix/Android.bp
+++ b/tools/lint/fix/Android.bp
@@ -25,6 +25,11 @@
name: "lint_fix",
main: "soong_lint_fix.py",
srcs: ["soong_lint_fix.py"],
+ version: {
+ py3: {
+ embedded_launcher: true,
+ },
+ },
}
python_library_host {