CI: add missing command line args to codespell.py. (#21127)

* CI: add missing command line args to codespell.py.

* CI: alter files parameters to codespell.py.

* CI: update verbose flag in codespell to be boolean.
This commit is contained in:
Jackson Oursland
2025-05-04 14:56:42 -07:00
committed by GitHub
parent 84b4ef32bc
commit c3c5fdf9e8
2 changed files with 24 additions and 2 deletions

View File

@@ -54,14 +54,36 @@ def main():
parser = argparse.ArgumentParser(
description="Run codespell on files and append a Markdown report."
)
parser.add_argument(
"--files",
action="extend",
nargs="+",
required=True,
help="List of files to spell check."
)
parser.add_argument(
"--ignore-words",
required=True,
help="Comma-separated list of words to ignore (from codespellignore).",
)
parser.add_argument(
"--log-dir",
required=True,
help="Directory to store the log file."
)
parser.add_argument(
"--report-file",
required=True,
help="Name of the report file."
)
parser.add_argument(
"--skip", required=True, help="Comma-separated list of file patterns to skip."
)
parser.add_argument(
"--verbose",
action='store_true',
help="Use verbose output."
)
args = parser.parse_args()
init_environment(args)
@@ -85,7 +107,7 @@ def main():
args.skip,
"-D",
dictionary_file,
] + args.files.split()
] + args.files
stdout, stderr, _ = run_command(cmd)
output = stdout + "\n" + stderr + "\n"