Skip to content

Commit d832f93

Browse files
authored
Merge pull request #7853 from tautschnig/bugfixes/fix-help-formatting
Fix help formatting errors and omissions
2 parents 6f3c16c + a49a734 commit d832f93

File tree

6 files changed

+32
-30
lines changed

6 files changed

+32
-30
lines changed

jbmc/src/janalyzer/janalyzer_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ void janalyzer_parse_optionst::help()
794794
"\n"
795795
"Other options:\n"
796796
" {y--version} \t show version and exit\n"
797-
" {y--verbosity {u#} \t verbosity level\n"
797+
" {y--verbosity} {u#} \t verbosity level\n"
798798
HELP_TIMESTAMP
799799
"\n");
800800
// clang-format on

src/analyses/variable-sensitivity/variable_sensitivity_domain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"value tracking\n" \
8888
" {y--vsd-structs} [{ytop-bottom}|{yevery-field}] \t " \
8989
"struct field sensitive analysis\n" \
90-
" {y--vsd-arrays} [[ytop-bottom}|{ysmash}|{yup-to-n-elements}|" \
90+
" {y--vsd-arrays} [{ytop-bottom}|{ysmash}|{yup-to-n-elements}|" \
9191
"{yevery-element}] \t " \
9292
"array entry sensitive analysis\n" \
9393
" {y--vsd-array-max-elements} {uN} \t " \

src/goto-cc/goto_cc_mode.cpp

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Author: CM Wintersteiger, 2006
2222
#endif
2323

2424
#include <util/exception_utils.h>
25+
#include <util/help_formatter.h>
2526
#include <util/message.h>
2627
#include <util/parse_options.h>
2728
#include <util/version.h>
@@ -53,25 +54,28 @@ void goto_cc_modet::help()
5354
<< align_center_with_border("Christoph Wintersteiger") << '\n'
5455
<<
5556
"\n";
57+
// clang-format on
5658

5759
help_mode();
5860

59-
std::cout <<
60-
"Usage: Purpose:\n"
61-
"\n"
62-
" --verbosity # verbosity level\n"
63-
" --function name set entry point to name\n"
64-
" --native-compiler cmd command to invoke as preprocessor/compiler\n"
65-
" --native-linker cmd command to invoke as linker\n"
66-
" --native-assembler cmd command to invoke as assembler (goto-as only)\n"
67-
" --export-file-local-symbols\n"
68-
" name-mangle and export file-local symbols\n"
69-
" --mangle-suffix suffix append suffix to exported file-local symbols\n"
70-
" --print-rejected-preprocessed-source file\n"
71-
" copy failing (preprocessed) source to file\n"
72-
" --object-bits number of bits used for object addresses\n"
73-
"\n";
74-
// clang-format on
61+
std::cout << help_formatter(
62+
"Usage: \tPurpose:\n"
63+
"\n"
64+
" {y--verbosity} {u#} \t verbosity level\n"
65+
" {y--function} {uname} \t set entry point to name\n"
66+
" {y--native-compiler} {ucmd} \t command to invoke as "
67+
"preprocessor/compiler\n"
68+
" {y--native-linker} {ucmd} \t command to invoke as linker\n"
69+
" {y--native-assembler} {ucmd} \t command to invoke as assembler "
70+
"(goto-as only)\n"
71+
" {y--export-file-local-symbols} \t "
72+
"name-mangle and export file-local symbols\n"
73+
" {y--mangle-suffix} {usuffix} \t append suffix to exported file-local "
74+
"symbols\n"
75+
" {y--print-rejected-preprocessed-source} {ufile} \t "
76+
"copy failing (preprocessed) source to file\n"
77+
" {y--object-bits} {N} \t number of bits used for object addresses\n"
78+
"\n");
7579
}
7680

7781
/// starts the compiler

src/goto-checker/bmc_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void run_property_decider(
227227
" {y--unwinding-assertions} \t generate unwinding assertions (cannot be " \
228228
"used with {y--cover})\n" \
229229
" {y--partial-loops} \t permit paths with partial loops\n" \
230-
" {y--no-self-loops-to-assumptions} \t do not simplify while(1){} to " \
230+
" {y--no-self-loops-to-assumptions} \t do not simplify while(1){ {}} to " \
231231
"assume(0)\n" \
232232
" {y--symex-complexity-limit} {uN} \t " \
233233
"how complex ({uN}) a path can become before symex abandons it. Currently " \

src/goto-instrument/contracts/dynamic-frames/dfcc.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,18 @@ class optionst;
5555
#define FLAG_DFCC "dfcc"
5656
#define OPT_DFCC "(" FLAG_DFCC "):"
5757

58-
// clang-format off
5958
#define HELP_DFCC \
60-
" --dfcc <harness> activate dynamic frame condition checking\n" \
61-
" for contracts using the given harness as\n" \
62-
" entry point\n"
59+
" {y--dfcc} {uharness} \t " \
60+
"activate dynamic frame condition checking for contracts using the given " \
61+
"harness as entry point\n"
6362

6463
#define FLAG_ENFORCE_CONTRACT_REC "enforce-contract-rec"
6564
#define OPT_ENFORCE_CONTRACT_REC "(" FLAG_ENFORCE_CONTRACT_REC "):"
6665
#define HELP_ENFORCE_CONTRACT_REC \
67-
" --enforce-contract-rec <function>[/<contract>]" \
68-
" wrap fun with an assertion of the contract\n"\
69-
" and assume recursive calls to fun satisfy \n"\
70-
" the contract\n"
71-
// clang-format on
66+
" {y--enforce-contract-rec} {ufunction}[{y/}{ucontract}] \t " \
67+
"wrap {ufunction} with an assertion of the contract and assume recursive " \
68+
"calls to " \
69+
"{ufunction} satisfy the contract\n"
7270

7371
/// Exception thrown for bad function/contract specification pairs passed on
7472
/// the CLI.

src/memory-analyzer/memory_analyzer_parse_options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ void memory_analyzer_parse_optionst::help()
183183
"\n"
184184
"Main options:\n"
185185
" {y--core-file} {ufile_name} \t analyze from core file {ufile_name}\n"
186-
" {y--breakpoint {uname} \t analyze from breakpoint {uname}\n"
187-
" {y--symbols {usymbol-list} \t list of symbols to analyze\n"
186+
" {y--breakpoint} {uname} \t analyze from breakpoint {uname}\n"
187+
" {y--symbols} {usymbol-list} \t list of symbols to analyze\n"
188188
" {y--symtab-snapshot} \t output snapshot as symbol table\n"
189189
" {y--output-file} {ufile_name} \t write snapshot to file {ufile_name}\n"
190190
" {y--json-ui} \t output snapshot in JSON format\n"

0 commit comments

Comments
 (0)