1CSBUILD(1) User Commands CSBUILD(1)
2
3
4
6 csbuild - tool for plugging static analyzers into the build process
7
9 usage: csbuild [-h] -c BUILD_CMD [-g GIT_COMMIT_RANGE] [--git-bisect]
10
11 [--added-exit-code ADDED_EXIT_CODE] [--base-fail-exit-code
12 BASE_FAIL_EXIT_CODE] [--print-current] [--no-print-current]
13 [--print-added] [--no-print-added] [--print-fixed]
14 [--no-print-fixed] [--clean] [--no-clean] [--cswrap-timeout
15 CSWRAP_TIMEOUT] [--color] [--no-color] [--gen-travis-yml]
16 [--install INSTALL] [--prep-cmd PREP_CMD] [--build-dir
17 BUILD_DIR] [-w GCC_WARNING_LEVEL] [--gcc-add-flag GCC_ADD_FLAG]
18 [--gcc-add-c-only-flag GCC_ADD_C_ONLY_FLAG]
19 [--gcc-add-cxx-only-flag GCC_ADD_CXX_ONLY_FLAG] [-U EMBED_CON‐
20 TEXT] [--version]
21
22 optional arguments:
23 -h, --help
24 show this help message and exit
25
26 -c BUILD_CMD, --build-cmd BUILD_CMD
27 Shell command used to build the sources. It runs in @BUILDDIR@
28 (which defaults to $PWD if --build-dir is not specified).
29 @SRCDIR@ expands to $PWD at the time of csbuild's invocation.
30
31 -g GIT_COMMIT_RANGE, --git-commit-range GIT_COMMIT_RANGE
32 range of git revisions for a differential scan in format
33 OLD_REV..NEW_REV
34
35 --git-bisect
36 if a new defect is added, use git-bisect to identify the cause
37 WARNING: The given command must (re)compile all sources for this
38 option to work!
39
40 --added-exit-code ADDED_EXIT_CODE
41 exit code to return if there is any defect added in the new ver‐
42 sion (default: 7)
43
44 --base-fail-exit-code BASE_FAIL_EXIT_CODE
45 exit code to return if the base scan fails (default: 0)
46
47 --print-current
48 print all defects in the current version (default unless -g is
49 given) WARNING: The given command must (re)compile all sources
50 for this option to work!
51
52 --no-print-current
53 disables --print-current
54
55 --print-added
56 print defects added in the new version (default if -g is given)
57
58 --no-print-added
59 disables --print-added
60
61 --print-fixed
62 print defects fixed in the new version WARNING: The given com‐
63 mand must (re)compile all sources for this option to work!
64
65 --no-print-fixed
66 disables --print-fixed
67
68 --clean
69 clean the temporary directory with results (and @BUILDDIR@) on
70 exit (default)
71
72 --no-clean
73 disables --clean
74
75 --cswrap-timeout CSWRAP_TIMEOUT
76 maximal amount of time in seconds taken by analysis of a single
77 module (default: 30)
78
79 --color
80 use colorized console output (default if connected to a tty)
81
82 --no-color
83 disables --color
84
85 --gen-travis-yml
86 generate the .travis.yml file for Travis CI (requires --install)
87
88 --install INSTALL
89 space-separated list of packages to install with
90 --gen-travis-yml
91
92 --prep-cmd PREP_CMD
93 Shell command to run before the build. It runs in @BUILDDIR@
94 (which defaults to $PWD if --build-dir is not specified).
95 @SRCDIR@ expands to $PWD at the time of csbuild's invocation.
96
97 --build-dir BUILD_DIR
98 Directory to be created to run the prep and build commands in
99 (optional). If not specified, the commands run in $PWD. @BUILD‐
100 DIR@ in the operand of --build-cmd and --prep-cmd expands to the
101 --build-dir operand converted to an absolute path. Use
102 --no-clean to preserve @BUILDDIR@ on exit.
103
104 -w GCC_WARNING_LEVEL, --gcc-warning-level GCC_WARNING_LEVEL
105 Adjust GCC warning level. -w0 means no additional warnings, -w1
106 appends -Wall and -Wextra, and -w2 enables some other useful
107 warnings (default: 2)
108
109 --gcc-add-flag GCC_ADD_FLAG
110 append the given compiler flag when invoking gcc (can be used
111 multiple times)
112
113 --gcc-add-c-only-flag GCC_ADD_C_ONLY_FLAG
114 append the given compiler flag when invoking gcc for C (can be
115 used multiple times)
116
117 --gcc-add-cxx-only-flag GCC_ADD_CXX_ONLY_FLAG
118 append the given compiler flag when invoking gcc for C++ (can be
119 used multiple times)
120
121 -U EMBED_CONTEXT, --embed-context EMBED_CONTEXT
122 embed a number of lines of context from the source file for the
123 key event (default: 3)
124
125 --version
126 print the version of csbuild and exit
127
128
129
130csbuild csmock-2.3.0-2.fc31 July 2019 CSBUILD(1)