C/C++ integration build analysis - Cheat sheet
In this topic: |
An integration build analysis
- gives you a snapshot of the current health of your software project. After you run an analysis, detected issues and reports are available in Validate.
- is the first step in establishing the connected desktop in your organization.
Prerequisities:
- Installing Klocwork
-
The first time you run the kwinject command on a project, verify that you have a clean build of that project. You can do this by running the clean command, for example make clean.
Your first analysis
- Create a project:
kwadmin --url http://server2:8080/ create-project my_project
- Capture your build settings:
kwinject <my_build_command>
Once you've got a build specification, confirm the existence of compile , link and, config lines. For more information, see Format of the build specification file for C/C++ projects.
- Run the analysis:
kwbuildproject --url http://server2:8080/my_project --tables-directory /my_tables kwinject.out
- Load the database:
kwadmin --url http://server2:8080/ load my_project /my_tables
Your next analysis
Subsequent analyses are incremental by default. Use the same commands as you used for your first analysis.
To take advantage of incremental analysis, don't delete your tables directory.
Re-run a full analysis
Whenever you do a clean build (full rebuild of your source files), you should run a full build analysis
- Create a new build specification:
kwinject --overwrite <my_build_command>
- Run the analysis:
kwbuildproject --url http://server2:8080/my_project --force --tables-directory /my_tables kwinject.out
- Load the database:
kwadmin --url http://server2:8080/ load my_project /my_tables