(
    client: GGClient,
    cache: Cache,
    commit_list: List[str],
    output_handler: OutputHandler,
    verbose: bool,
    exclusion_regexes: Set[re.Pattern],
    matches_ignore: Iterable[str],
    all_policies: bool,
    scan_id: str,
    mode_header: str,
    banlisted_detectors: Optional[Set[str]] = None,
)
return return_code
Scan every commit in a range.

    :param client: Public Scanning API client
    :param commit_list: List of commits sha to scan
    :param verbose: Display successfull scan's message
Scan every commit in a range.
Scan every commit in a range .
def scan_commit_range(
    client: GGClient,
    cache: Cache,
    commit_list: List[str],
    output_handler: OutputHandler,
    verbose: bool,
    exclusion_regexes: Set[re.Pattern],
    matches_ignore: Iterable[str],
    all_policies: bool,
    scan_id: str,
    mode_header: str,
    banlisted_detectors: Optional[Set[str]] = None,
) -> int:  # pragma: no cover
    """
    Scan every commit in a range.

    :param client: Public Scanning API client
    :param commit_list: List of commits sha to scan
    :param verbose: Display successfull scan's message
    """
    return_code = 0
    with concurrent.futures.ThreadPoolExecutor(
        max_workers=min(CPU_COUNT, 4)
    ) as executor:
        future_to_process = [
            executor.submit(
                scan_commit,
                Commit(sha, exclusion_regexes),
                client,
                cache,
                verbose,
                matches_ignore,
                all_policies,
                mode_header,
                banlisted_detectors,
            )
            for sha in commit_list
        ]

        scans: List[ScanCollection] = []
        with click.progressbar(
            iterable=concurrent.futures.as_completed(future_to_process),
            length=len(future_to_process),
            label=format_text("Scanning Commits", STYLE["progress"]),
        ) as completed_futures:
            for future in completed_futures:
                scans.append(future.result())

        return_code = output_handler.process_scan(
            ScanCollection(id=scan_id, type="commit-range", scans=scans)
        )
    return return_code
def scan_commit_range ( client : GGClient , cache : Cache , commit_list : List [ str ] , output_handler : OutputHandler , verbose : bool , exclusion_regexes : Set [ re . Pattern ] , matches_ignore : Iterable [ str ] , all_policies : bool , scan_id : str , mode_header : str , banlisted_detectors : Optional [ Set [ str ] ] = None , ) -> int : # pragma: no cover return_code = 0 with concurrent . futures . ThreadPoolExecutor ( max_workers = min ( CPU_COUNT , 4 ) ) as executor : future_to_process = [ executor . submit ( scan_commit , Commit ( sha , exclusion_regexes ) , client , cache , verbose , matches_ignore , all_policies , mode_header , banlisted_detectors , ) for sha in commit_list ] scans : List [ ScanCollection ] = [ ] with click . progressbar ( iterable = concurrent . futures . as_completed ( future_to_process ) , length = len ( future_to_process ) , label = format_text ( "Scanning Commits" , STYLE [ "progress" ] ) , ) as completed_futures : for future in completed_futures : scans . append ( future . result ( ) ) return_code = output_handler . process_scan ( ScanCollection ( id = scan_id , type = "commit-range" , scans = scans ) ) return return_code