()
| 278 | def main(): |
| 279 | # TODO: add --hang option to detect code which impacts the analysis time |
| 280 | def show_syntax(): |
| 281 | print('Syntax:') |
| 282 | print(' reduce.py --exe <cppcheck executable> --exe_args <full command> --expected <expected text output> --file <source file> [--segfault]') |
| 283 | print('') |
| 284 | print("Example. source file = foo/bar.c") |
| 285 | print( |
| 286 | ' reduce.py --exe ./cppcheck --exe_args " --enable=style" --expected "Variable \'x\' is reassigned" --file foo/bar.c') |
| 287 | sys.exit(1) |
| 288 | |
| 289 | if len(sys.argv) == 1: |
| 290 | show_syntax() |