@@ -64,10 +64,7 @@ def sca_scan_all(
6464 check_directory_not_ignored (directory , exclusion_regexes )
6565
6666 sca_filepaths , sca_filter_status_code = get_sca_scan_all_filepaths (
67- directory = directory ,
68- exclusion_regexes = exclusion_regexes ,
69- verbose = config .user_config .verbose ,
70- client = client ,
67+ directory = directory , exclusion_regexes = exclusion_regexes , client = client
7168 )
7269
7370 if len (sca_filepaths ) == 0 :
@@ -109,10 +106,7 @@ def sca_scan_all(
109106
110107
111108def get_sca_scan_all_filepaths (
112- directory : Path ,
113- exclusion_regexes : Set [Pattern [str ]],
114- verbose : bool ,
115- client : GGClient ,
109+ directory : Path , exclusion_regexes : Set [Pattern [str ]], client : GGClient
116110) -> Tuple [List [str ], int ]:
117111 """
118112 Retrieve SCA related files of a directory.
@@ -140,10 +134,10 @@ def get_sca_scan_all_filepaths(
140134 # Only sca_files field is useful in the case of a full_scan,
141135 # all the potential files already exist in `all_filepaths`
142136 sca_files = response .sca_files
143- if verbose :
144- ui .display_info ("> Scanned files:" )
137+ if ui . is_verbose () :
138+ ui .display_verbose ("> Scanned files:" )
145139 for filename in sca_files :
146- ui .display_info (f"- { click .format_filename (filename )} " )
140+ ui .display_verbose (f"- { click .format_filename (filename )} " )
147141
148142 return sca_files , response .status_code
149143
@@ -159,7 +153,7 @@ def create_output_handler(ctx: click.Context) -> SCAOutputHandler:
159153 output_handler_cls = SCATextOutputHandler
160154 config = ctx_obj .config
161155 return output_handler_cls (
162- verbose = config . user_config . verbose , exit_zero = config .user_config .exit_zero
156+ verbose = ui . is_verbose () , exit_zero = config .user_config .exit_zero
163157 )
164158
165159
@@ -204,19 +198,11 @@ def sca_scan_diff(
204198 previous_files = []
205199 else :
206200 previous_files = sca_files_from_git_repo (
207- directory ,
208- previous_ref ,
209- client ,
210- exclusion_regexes = exclusion_regexes ,
211- verbose = config .user_config .verbose ,
201+ directory , previous_ref , client , exclusion_regexes = exclusion_regexes
212202 )
213203
214204 current_files = sca_files_from_git_repo (
215- directory ,
216- current_ref ,
217- client ,
218- exclusion_regexes = exclusion_regexes ,
219- verbose = config .user_config .verbose ,
205+ directory , current_ref , client , exclusion_regexes = exclusion_regexes
220206 )
221207
222208 if len (previous_files ) == 0 and len (current_files ) == 0 :
0 commit comments