Skip to content

Commit

Permalink
Merge pull request #95 from Pennycook/simplify-report-option
Browse files Browse the repository at this point in the history
Simplify the --report option
  • Loading branch information
Pennycook committed Apr 4, 2024
2 parents d9bcb33 + 86b57a5 commit 0c6037b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions bin/codebasin
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ def main():
"--report",
dest="reports",
metavar="<report>",
default=["all"],
action="append",
default=[],
choices=["all", "summary", "clustering"],
nargs="+",
help="Generate a report of the specified type.",
help="Generate a report of the specified type. "
+ "May be specified multiple times. "
+ "If not specified, all reports will be generated.",
)
deprecated_args.add_argument(
"-d",
Expand Down Expand Up @@ -144,11 +146,11 @@ def main():
"--dump will be removed in a future release.",
DeprecationWarning,
)
if len(args.reports) > 1:
warnings.warn(
"Passing more than one value to --report (-R) is deprecated.",
DeprecationWarning,
)

# If no specific report was specified, generate all reports.
# Handled here to prevent "all" always being in the list.
if len(args.reports) == 0:
args.reports = ["all"]

# Determine the root directory based on where codebasin is run.
rootdir = os.path.realpath(os.getcwd())
Expand Down

0 comments on commit 0c6037b

Please sign in to comment.