Skip to content

Commit 7176be2

Browse files
committed
feat(report): show progress bar during long report generation
1 parent 367678f commit 7176be2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codesectools/sasts/all/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def report(
230230
) -> None:
231231
"""Generate an HTML report for a project's aggregated analysis results."""
232232
from rich.console import Console
233+
from rich.progress import track
233234
from rich.style import Style
234235
from rich.syntax import Syntax
235236
from rich.table import Table
@@ -301,7 +302,10 @@ def report(
301302
main_table = Table(title="")
302303
main_table.add_column("Files (sorted by defect number)")
303304

304-
for defect_data in report_data["defects"].values():
305+
for defect_data in track(
306+
report_data["defects"].values(),
307+
description="Generating report for source file with defects...",
308+
):
305309
defect_report_name = (
306310
f"{sha256(defect_data['source_path'].encode()).hexdigest()}.html"
307311
)

0 commit comments

Comments
 (0)