Skip to content

Commit

Permalink
Add --help to explain usage
Browse files Browse the repository at this point in the history
  • Loading branch information
falOn-Dev committed Sep 9, 2024
1 parent b9d764b commit d373466
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/check_codeblock_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def main():
"""
# Set up argument parsing
parser = argparse.ArgumentParser(
description="Check code block coverage in FRC docs"
description="Check code block coverage in FRC docs",
add_help=False,
)
parser.add_argument("--dir", type=str, help="Directory to search for rst files")
parser.add_argument(
Expand All @@ -186,10 +187,19 @@ def main():
default=["java", "python", "c++"],
help="Languages to check for",
)
parser.add_argument(
"--help",
action="store_true",
help="Displays the help message",
)

# Parse the command line arguments
args = parser.parse_args()

if args.help:
print(__doc__)
return

# Get all .rst files from the specified directory
files = get_all_rst_files(dir=args.dir)
blocks = []
Expand Down

0 comments on commit d373466

Please sign in to comment.