gh-112301: Add argument aliases and tee compiler output for check warnings (GH-122465)

Also remove superfluous shebang from the warning check script
This commit is contained in:
Nate Ohlson 2024-07-30 14:49:15 -05:00 committed by GitHub
parent c68cb8e0c9
commit 1cac0908fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""
Parses compiler output with -fdiagnostics-format=json and checks that warnings
exist only in files that are expected to have warnings.
@ -114,24 +113,28 @@ def get_unexpected_improvements(
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser()
parser.add_argument(
"-c",
"--compiler-output-file-path",
type=str,
required=True,
help="Path to the compiler output file",
)
parser.add_argument(
"-i",
"--warning-ignore-file-path",
type=str,
required=True,
help="Path to the warning ignore file",
)
parser.add_argument(
"-x",
"--fail-on-regression",
action="store_true",
default=False,
help="Flag to fail if new warnings are found",
)
parser.add_argument(
"-X",
"--fail-on-improvement",
action="store_true",
default=False,