diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 37a84a9ce..4c71ebc13 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -762,7 +762,7 @@ and bugs_tests = and bugs_txt = CLOpt.mk_path_opt ~deprecated:["bugs_txt"] ~long:"issues-txt" ~in_help:CLOpt.([(Report, manual_generic)]) - ~meta:"file" "Write a list of issues in text format to $(i,file)" + ~meta:"file" "Write a list of issues in text format to $(i,file) (default: infer-out/bugs.txt)" and calls_csv = CLOpt.mk_path_opt ~deprecated:["calls"] ~long:"calls-csv" diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index 0d1f5b081..6fb977b6e 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -357,8 +357,8 @@ let report () = let report_csv = if Config.buck_cache_mode then None else Some (Config.results_dir ^/ "report.csv") in - let report_json = Some Config.(results_dir ^/ report_json) in - InferPrint.main ~report_csv ~report_json ; + let report_json = Config.(results_dir ^/ report_json) in + InferPrint.main ~report_csv ~report_json:(Some report_json) ; (* Post-process the report according to the user config. By default, calls report.py to create a human-readable report. @@ -369,11 +369,18 @@ let report () = | false, Some prog -> let if_some key opt args = match opt with None -> args | Some arg -> key :: arg :: args in let if_true key opt args = if not opt then args else key :: args in + let bugs_txt = Option.value ~default:(Config.results_dir ^/ "bugs.txt") Config.bugs_txt in let args = - if_some "--issues-csv" report_csv @@ if_some "--issues-json" report_json - @@ if_some "--issues-txt" Config.bugs_txt + if_some "--issues-csv" report_csv @@ if_true "--pmd-xml" Config.pmd_xml - ["--project-root"; Config.project_root; "--results-dir"; Config.results_dir] + [ "--issues-json" + ; report_json + ; "--issues-txt" + ; bugs_txt + ; "--project-root" + ; Config.project_root + ; "--results-dir" + ; Config.results_dir ] in if is_error (Unix.waitpid (Unix.fork_exec ~prog ~argv:(prog :: args) ())) then L.external_error