Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the --report option #95

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions bin/codebasin
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ 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.",
)
deprecated_args.add_argument(
"-d",
Expand Down Expand Up @@ -144,11 +145,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.
laserkelvin marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading