[report] restore "no issues found" output

Summary: We lost it at some point...

Reviewed By: dulmarod

Differential Revision: D5264303

fbshipit-source-id: 71cd3b0
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent 45a8e48e00
commit da82d94a12

@ -94,12 +94,14 @@ def _text_of_report_list(project_root, reports, bugs_txt_path, limit=None,
formatter=colorize.TERMINAL_FORMATTER): formatter=colorize.TERMINAL_FORMATTER):
n_issues = len(reports) n_issues = len(reports)
if n_issues == 0: if n_issues == 0:
msg = 'No issues found'
if formatter == colorize.TERMINAL_FORMATTER: if formatter == colorize.TERMINAL_FORMATTER:
out = colorize.color(' No issues found ', msg = colorize.color(' %s ' % msg,
colorize.SUCCESS, formatter) colorize.SUCCESS, formatter)
return out + '\n' if console_out:
else: utils.stderr(msg)
return 'No issues found' return msg
text_errors_list = [] text_errors_list = []
for report in reports[:limit]: for report in reports[:limit]:
@ -174,7 +176,6 @@ def _text_of_report_list(project_root, reports, bugs_txt_path, limit=None,
) )
if console_out: if console_out:
utils.stderr('')
utils.stderr(bug_list) utils.stderr(bug_list)
utils.stdout(summary) utils.stdout(summary)
@ -194,6 +195,7 @@ def print_and_save_errors(infer_out, project_root, json_report, bugs_out,
pmd_xml): pmd_xml):
errors = utils.load_json_from_path(json_report) errors = utils.load_json_from_path(json_report)
errors = [e for e in errors if _is_user_visible(project_root, e)] errors = [e for e in errors if _is_user_visible(project_root, e)]
utils.stderr('')
_text_of_report_list(project_root, errors, bugs_out, console_out=True, _text_of_report_list(project_root, errors, bugs_out, console_out=True,
limit=10) limit=10)
plain_out = _text_of_report_list(project_root, errors, bugs_out, plain_out = _text_of_report_list(project_root, errors, bugs_out,

Loading…
Cancel
Save