From 0bd5ef8d0f786fb4df7b15a97ee3a82d8ce3616f Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 31 Jul 2017 06:54:45 -0700 Subject: [PATCH] [report-hook] take location of bugs.txt from the command line Summary: This was hardcoded but it's passed as an option to the script. It can be useful to generate text reports from arbitrary json reports, eg: ./infer/lib/python/report.py --issues-json infer-out/report.json --project-root . --results-dir infer-out --issues-txt foo.txt Reviewed By: martinoluca Differential Revision: D5526683 fbshipit-source-id: 3f9c3ee --- infer/lib/python/report.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infer/lib/python/report.py b/infer/lib/python/report.py index c00276dd3..0e76cd8f7 100755 --- a/infer/lib/python/report.py +++ b/infer/lib/python/report.py @@ -24,7 +24,7 @@ arg_parser.add_argument('--issues-csv', metavar='', arg_parser.add_argument('--issues-json', metavar='', required=True, help='Location of the json report') arg_parser.add_argument('--issues-txt', metavar='', - help='Location of the text report (ignored for now)') + help='Location of the text report') arg_parser.add_argument('--issues-xml', metavar='', help='Location of the xml report (ignored for now)') arg_parser.add_argument('--pmd-xml', action='store_true', @@ -38,9 +38,9 @@ arg_parser.add_argument('--results-dir', metavar='', required=True, def main(): sys_argv = map(utils.decode, sys.argv) args = arg_parser.parse_args(sys_argv[1:]) - bugs_out = os.path.join(args.results_dir, config.BUGS_FILENAME) issues.print_and_save_errors(args.results_dir, args.project_root, - args.issues_json, bugs_out, args.pmd_xml) + args.issues_json, args.issues_txt, + args.pmd_xml) if __name__ == '__main__':