@@ -214,9 +214,12 @@ def attrib(location, output, template, mapping, inventory, quiet):
214214
215215@cli .command (cls = AboutCommand , short_help = 'LOCATION: directory' )
216216@click .argument ('location' , nargs = 1 , required = True , type = click .Path (exists = True , readable = True , resolve_path = True ))
217- def check (location ):
217+ @click .option ('--show-all' , is_flag = True , help = 'Show all the errors and warning' )
218+ def check (location , show_all ):
218219 """
219- Validating ABOUT files at LOCATION.
220+ Validating ABOUT files at LOCATION. [Default: it will only shows the following
221+ level of errors: 'CRITICAL', 'ERROR', and 'WARNING'.
222+ Use the `--show-all` option to show all kind of errors.
220223
221224LOCATION: Path to an ABOUT file or a directory containing ABOUT files.
222225 """
@@ -229,16 +232,19 @@ def check(location):
229232 print_errors = []
230233 for severity , message in errors :
231234 sever = severities [severity ]
232- if sever in problematic_errors :
235+ if show_all :
233236 print_errors .append ((msg_format % locals ()))
237+ else :
238+ if sever in problematic_errors :
239+ print_errors .append ((msg_format % locals ()))
234240
235- number_of_problematic_errors = len (print_errors )
241+ number_of_errors = len (print_errors )
236242
237243 for err in print_errors :
238244 print (err )
239245
240246 if print_errors :
241- click .echo ('Found %(number_of_problematic_errors )d errors' % locals ())
247+ click .echo ('Found %(number_of_errors )d errors' % locals ())
242248 sys .exit (1 )
243249 else :
244250 click .echo ('No error is found.' )
0 commit comments