mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] python_format: Add some useful forwarded options
This commit is contained in:
@@ -112,7 +112,7 @@ def parse_args():
|
||||
parser.add_argument(
|
||||
"--check",
|
||||
action="store_true",
|
||||
help="Don't format the file, just return the status.",
|
||||
help="Don't write the files back, just return the status.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
@@ -122,6 +122,19 @@ def parse_args():
|
||||
help="Emit messages to stderr about files that were not changed.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--diff",
|
||||
action="store_true",
|
||||
help="Don't write the files back, just output a diff for each file on stdout.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-S",
|
||||
"--skip-string-normalization",
|
||||
action="store_true",
|
||||
help="Don't normalize string quotes or prefixes.",
|
||||
)
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@@ -144,6 +157,10 @@ def main():
|
||||
command.append("--check")
|
||||
if args.verbose:
|
||||
command.append("--verbose")
|
||||
if args.diff:
|
||||
command.append("--diff")
|
||||
if args.skip_string_normalization:
|
||||
command.append("--skip-string-normalization")
|
||||
|
||||
requested_paths = [path.resolve() for path in args.paths]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user