diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2a1f48480b..eb50ceb89b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -38,6 +38,9 @@ v33.0.0 (next next, roadmap) - Update Dockerfile and test container build. See https://github.com/aboutcode-org/scancode-toolkit/issues/3955 +- Progress bar now shows length. You can estimate the duration now. + See https://github.com/aboutcode-org/scancode-toolkit/issues/3342 + v32.3.1 - 2024-01-06 -------------------- diff --git a/src/scancode/cli.py b/src/scancode/cli.py index add654f2ec..69b7082629 100644 --- a/src/scancode/cli.py +++ b/src/scancode/cli.py @@ -1176,10 +1176,11 @@ def run_scanners( progress_manager = None if not quiet: + resources = list(((r.location, r.path) for r in codebase.walk() if r.is_file)) echo_func(f'Scan files for: {scan_names} with {processes} process(es)...') item_show_func = partial(path_progress_message, verbose=verbose) progress_manager = partial(progressmanager, - item_show_func=item_show_func, + item_show_func=item_show_func, length=len(resources)*2, verbose=verbose, file=sys.stderr) # TODO: add CLI option to bypass cache entirely?