Running your first integration build analysis
The steps in running your first analysis are:
Create an integration projectTo create a project, run kwadmin create-project: kwadmin --url http(s)://<host>:<port>/ create-project <project_name> where
Project and build names must start with a letter or a digit. Period (.), minus sign (-), ampersand (&), white space and the underscore character are also allowed in project and build names. Also note that each cannot be longer than 64 characters. Note: To reference a project on the command line, you must specify the project using the correct case (since project names are case sensitive). You must also specify the exact, current name of the project as it appears in Klocwork Static Code Analysis.
Example kwadmin --url http://server2:8080/ create-project my_project
Capture your build settingsDetails: Creating a Java build specification
Run an analysis using the build specificationTo analyze your project, run kwbuildproject, specifying the name and server location of your project: kwbuildproject --url http(s)://<host>:<port>/<project_name> --tables-directory <dir> [<options>] <build_specification1> [<build_specification2>...] where:
Example kwbuildproject --url http://server2:8080/my_project home/klocwork/myproject.out --tables-directory /my_tables The kwbuildproject command runs in four stages:
Progress is displayed while the analysis is running. kwbuildproject returns error code 1 on any build failure (such as missing includes and compiler failures). If you see errors such as include or parse errors, see Troubleshooting.
Check your build logsWhen the analysis is complete, you can find the full build log (build.log) and parse errors log (parse_errors.log) in the output tables directory. You can also view them in Klocwork Static Code Analysis. See Viewing integration build log files. See also What's In Your Static Analysis Build Log and Why You Should Care.
Load the databaseTo load your analysis results into the Klocwork database, run kwadmin load: kwadmin --url http(s)://<host>:<port>/ load <project_name> [<tables_directory>] where
Example: kwadmin --url http://server2:8080/ load my_project /my_tables Source files for the project are copied from the client side to the server side when the project is loaded into the Klocwork database. Source files as well as all include files are copied to the projects_root in a .ZIP archive.
What's next?
|