From ae8632b0beec96d33f356638f9d5f2a2adcd3bc8 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 6 Aug 2018 05:08:23 -0700 Subject: [PATCH] [test determinator] clean up options help Summary: Because of the custom formatting we do on top of `Cmdliner.Manpage` in `CommandLineOption`, the long `$(b,strings inside bold block)` would sometimes end up split across several lines and then `Cmdliner` complains about the line ending before having seen the closing parenthesis `)`. Instead of allowing these long strings, remove then from the help message as they don't seem very useful to me. Replace them with just a mention of `--test-determinator` so all the options related to Test Determinator are easy to look up. Also change the relevant options from `CLOpt.mk_string` to `CLOpt.mk_path` because they look like they are supposed to be paths. Reviewed By: ddino Differential Revision: D9133505 fbshipit-source-id: d82acf5bf --- infer/src/base/Config.ml | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 3df5d6b45..f8b2dd3b0 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1550,11 +1550,9 @@ and max_nesting = and method_decls_info = - CLOpt.mk_string_opt ~long:"method-decls-info" - "Specifies the file containing the method declarations info (eg. start line, end line, \ - class, method name, etc.) when Infer is run Test Determinator mode. Used in combination with \ - other options as follows: $(b,--test-determinator --modified-lines modified_line_file \ - --profiler-sample profiler_sample_file --method-decls-info minfo.json)" + CLOpt.mk_path_opt ~long:"method-decls-info" ~meta:"method_decls_info.json" + "Specifies the file containing the method declarations info (eg. start line, end line, class, \ + method name, etc.) when Infer is run Test Determinator mode with $(b,--test-determinator)." and merge = @@ -1574,11 +1572,9 @@ and ml_buckets = and modified_lines = - CLOpt.mk_string_opt ~long:"modified-lines" - "Specifies the file containing the modified lines when Infer is run Test Determinator mode. \ - Used in combination with other options as follows:\n \ - $(b, --test-determinator --modified-lines modified_lines_file --profiler-sample \ - profiler_sample_file)" + CLOpt.mk_path_opt ~long:"modified-lines" + "Specifies the file containing the modified lines when Infer is run Test Determinator mode \ + with $(b,--test-determinator)." and modified_targets = @@ -2059,9 +2055,8 @@ and symops_per_iteration = and test_determinator = CLOpt.mk_bool ~long:"test-determinator" ~default:false - "Run infer in Test Determinator mode. It is used together with the --modified-lines and \ - --test-profiler flags which speficy the relevant arguments. E.g. $(b, --test-determinator \ - --modified-lines modified_line_file --profiler-sample profiler_sample_file)" + "Run infer in Test Determinator mode. It is used together with the $(b,--modified-lines) and \ + $(b,--test-profiler) flags, which speficy the relevant arguments." and test_filtering = @@ -2070,11 +2065,9 @@ and test_filtering = and profiler_samples = - CLOpt.mk_string_opt ~long:"profiler-samples" - "Specifies the file containing the profiler samples when Infer is run Test Determinator mode. \ - Used in combination with other options as follows:\n \ - $(b,--test-determinator --modified-lines modified_line_file --profiler-samples \ - profiler_samples_file)" + CLOpt.mk_path_opt ~long:"profiler-samples" + "File containing the profiler samples when Infer is run Test Determinator mode with \ + $(b,--test-determinator)." and testing_mode =