@@ -119,7 +119,7 @@ def cli():
119119 type = click .Path (exists = True , dir_okay = True , readable = True , resolve_path = True ),
120120 help = 'Use a custom mapping file with mapping between input keys and ABOUT field names.' )
121121
122- @click .option ('--show-all ' , is_flag = True , default = False ,
122+ @click .option ('--verbose ' , is_flag = True , default = False ,
123123 help = 'Show all errors and warnings. '
124124 'By default, the tool only prints these '
125125 'error levels: CRITICAL, ERROR, and WARNING. '
@@ -132,7 +132,7 @@ def cli():
132132
133133@click .help_option ('-h' , '--help' )
134134
135- def inventory (location , output , mapping , mapping_file , quiet , format , show_all ):
135+ def inventory (location , output , mapping , mapping_file , quiet , format , verbose ):
136136 """
137137Collect a JSON or CSV inventory of components from .ABOUT files.
138138
@@ -163,7 +163,7 @@ def inventory(location, output, mapping, mapping_file, quiet, format, show_all):
163163
164164 finalized_errors = ignore_about_resource_path_not_exist_error (errors )
165165
166- log_errors (finalized_errors , quiet , show_all , os .path .dirname (output ))
166+ log_errors (finalized_errors , quiet , verbose , os .path .dirname (output ))
167167 sys .exit (0 )
168168
169169
@@ -203,7 +203,7 @@ def inventory(location, output, mapping, mapping_file, quiet, format, show_all):
203203 type = click .Path (exists = True , dir_okay = True , readable = True , resolve_path = True ),
204204 help = 'Use a custom mapping file with mapping between input keys and ABOUT field names.' )
205205
206- @click .option ('--show-all ' , is_flag = True , default = False ,
206+ @click .option ('--verbose ' , is_flag = True , default = False ,
207207 help = 'Show all errors and warnings. '
208208 'By default, the tool only prints these '
209209 'error levels: CRITICAL, ERROR, and WARNING. '
@@ -217,7 +217,7 @@ def inventory(location, output, mapping, mapping_file, quiet, format, show_all):
217217@click .help_option ('-h' , '--help' )
218218
219219def gen (location , output , mapping , mapping_file , license_notice_text_location , fetch_license ,
220- quiet , show_all ):
220+ quiet , verbose ):
221221 """
222222Generate .ABOUT files in OUTPUT directory from a JSON or CSV inventory of .ABOUT files at LOCATION.
223223
@@ -247,7 +247,7 @@ def gen(location, output, mapping, mapping_file, license_notice_text_location, f
247247 error_count = error_count + 1
248248 click .echo (
249249 'Generated %(about_count)d .ABOUT files with %(error_count)d errors or warnings' % locals ())
250- log_errors (finalized_errors , quiet , show_all , output )
250+ log_errors (finalized_errors , quiet , verbose , output )
251251 sys .exit (0 )
252252
253253
@@ -277,7 +277,7 @@ def gen(location, output, mapping, mapping_file, license_notice_text_location, f
277277 type = click .Path (exists = True , dir_okay = True , readable = True , resolve_path = True ),
278278 help = 'Use a custom mapping file with mapping between input keys and ABOUT field names.' )
279279
280- @click .option ('--show-all ' , is_flag = True , default = False ,
280+ @click .option ('--verbose ' , is_flag = True , default = False ,
281281 help = 'Show all errors and warnings. '
282282 'By default, the tool only prints these '
283283 'error levels: CRITICAL, ERROR, and WARNING. '
@@ -293,7 +293,7 @@ def gen(location, output, mapping, mapping_file, license_notice_text_location, f
293293
294294@click .help_option ('-h' , '--help' )
295295
296- def attrib (location , output , template , mapping , mapping_file , inventory , quiet , show_all ):
296+ def attrib (location , output , template , mapping , mapping_file , inventory , quiet , verbose ):
297297 """
298298Generate an attribution document at OUTPUT using .ABOUT files at LOCATION.
299299
@@ -327,7 +327,7 @@ def attrib(location, output, template, mapping, mapping_file, inventory, quiet,
327327
328328 finalized_errors = ignore_about_resource_path_not_exist_error (inv_errors )
329329
330- log_errors (finalized_errors , quiet , show_all , os .path .dirname (output ))
330+ log_errors (finalized_errors , quiet , verbose , os .path .dirname (output ))
331331 click .echo ('Finished.' )
332332 sys .exit (0 )
333333
@@ -341,7 +341,7 @@ def attrib(location, output, template, mapping, mapping_file, inventory, quiet,
341341@click .argument ('location' , nargs = 1 , required = True ,
342342 type = click .Path (exists = True , readable = True , resolve_path = True ))
343343
344- @click .option ('--show-all ' , is_flag = True , default = False ,
344+ @click .option ('--verbose ' , is_flag = True , default = False ,
345345 help = 'Show all errors and warnings. '
346346 'By default, the tool only prints these '
347347 'error levels: CRITICAL, ERROR, and WARNING. '
@@ -351,7 +351,7 @@ def attrib(location, output, template, mapping, mapping_file, inventory, quiet,
351351
352352@click .help_option ('-h' , '--help' )
353353
354- def check (location , show_all ):
354+ def check (location , verbose ):
355355 """
356356Check and validate .ABOUT file(s) at LOCATION for errors and
357357print error messages on the terminal.
@@ -367,7 +367,7 @@ def check(location, show_all):
367367 print_errors = []
368368 for severity , message in errors :
369369 sever = severities [severity ]
370- if show_all :
370+ if verbose :
371371 print_errors .append (msg_format % locals ())
372372 elif sever in problematic_errors :
373373 print_errors .append (msg_format % locals ())
@@ -386,7 +386,7 @@ def check(location, show_all):
386386 sys .exit (0 )
387387
388388
389- def log_errors (errors , quiet , show_all , base_dir = False ):
389+ def log_errors (errors , quiet , verbose , base_dir = False ):
390390 """
391391 Iterate of sequence of Error objects and print and log errors with
392392 a severity superior or equal to level.
@@ -414,7 +414,7 @@ def log_errors(errors, quiet, show_all, base_dir=False):
414414 for severity , message in errors :
415415 sever = severities [severity ]
416416 if not quiet :
417- if show_all :
417+ if verbose :
418418 print (msg_format % locals ())
419419 elif sever in problematic_errors :
420420 print (msg_format % locals ())
0 commit comments