Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

Managing integration projects and builds

Managing integration projects and builds

This article provides information on project and build management tasks. If access control has been set up, these tasks require administrative permissions.

Getting started

Step 1: Create an integration project

After installing the Server package and starting the Klocwork Servers, creating an integration project is the next step in getting Klocwork up and running on your code.

Typically, you create an integration project for each of your integration builds.

To create a project, log in to Klocwork Static Code Analysis and click Projects if you're not already viewing the Projects list. If no projects exist, just start entering text in the fields; otherwise, click Create a new project . You'll see project creation tips on the page. When you create a project, you are assigned the role of Project admin by default.

Tip: You can also create a project with the command kwadmin create-project.

Step 2: Capture your build settings

In this step, Klocwork captures all of the information it needs to provide a centralized view of the entire code stream. Klocwork stores this information in a structured build log -- called a build specification. The build specification is the basis of the analysis.

It's important that the build specification is an accurate and up-to-date representation of your build. If the build specification is inaccurate, the analysis will be inaccurate too.

C/C++ | Java | C# | Mixed C/C++/C#

Step 3: Run the analysis

Once you've got a valid build specification, use it to analyze the project with kwbuildproject.

C/C++ | Java | C# | Mixed C/C++/C#

Step 4: Load the database

Now it's time to load your results into the database.

C/C++ | Java | C# | Mixed C/C++/C#

Step 5: View the analysis results

At this point, you can return to Static Code Analysis and view the analysis results. You might need to click Projects to refresh the projects list.

Project management

The Projects list of Klocwork Static Code Analysis allows you to perform project management tasks such as:

  • create, rename and delete projects
  • manage views
  • organize your code into modules
  • configure checkers
  • manage configuration files

Projects tips

  • Toggle between Project Details and the Cross-Project Report by clicking a project.
  • You can filter the project list to limit what you see by entering text in the Filter field. The Filter field searches project names, descriptions and tags. The active filter also affects the Cross-Project Report. To view the entire Projects list again, click x next to the Filter field.
  • Use tags to organize the Projects list. Click a project in the Projects list, click the Edit icon, and add text to the Tags field. Separate tags with commas. Clicking a saved tag filters the project list.
  • If you prefer to focus on issues with the 'Analyze' status, you can apply the analyze only tag to your project. Click a project in the Projects list, click the Edit icon, and click on the status analyze link. Save the changes and if you click the New issue link for that project, your issue list is filtered to only show issues with the status of 'Analyze'. Note that this tag does not affect the number of issues displayed in the Cross-Project Report.
  • Get email notification of new issues in Static Code Analysis.

To learn how to access Static Code Analysis, see Accessing Static Code Analysis.

You can also use the command-line tool kwadmin for many project management tasks.

Build management

The Builds page of Klocwork Static Code Analysis allows you to perform build management tasks such as:

  • view a list of builds for a selected project
  • filter the build list
  • rename builds (if you want to label a milestone build, for example)
  • delete builds
  • set up a build retention policy
  • view the build log

To access the builds page, click a project in the Project list and click Builds.

Tip: You can also use the Web API or the command-line tool kwadmin for build management tasks.

Setting up a build retention policy

The space required to store integration build analysis data can grow very large over time. To save disk space, you can:

  • delete individual builds in Static Code Analysis, with kwadmin delete-build, or with the Web API
  • enable automatic build deletion
    Note: In order to enable automatic build deletion, you need to have the Project admin role.

When you set a build retention policy, you set the number of builds to keep. By default, Klocwork keeps 20 builds. You can also prevent specific builds from being deleted; these builds are not included in the count of builds to keep. For example, if you set the threshold to keep 30 builds and also prevent 10 builds from being deleted, Klocwork will keep 40 builds.

Automatically delete old builds

  1. Log in to Static Code Analysis, if you haven't already done so.
  2. If you're not viewing the Projects list, click Projects at the top left.
  3. Click a project in the list. The project details are displayed.
  4. In the project details, click Builds.
  5. Select auto-delete old builds.
  6. You now see the default threshold setting.
  7. To change this number, click the pencil icon and enter another number.

The old builds you set to be deleted are automatically removed the next time you create a build.

Tip: You can also enable automatic build deletion with kwadmin set-project-property. For example, to enable automatic build deletion for MyProject and keep the ten most recent builds:
kwadmin set-project-property MyProject auto_delete_threshold 10

To turn off automatic build deletion with kwadmin, pass a null value for auto_delete_threshold:

kwadmin set-project-property MyProject auto_delete_threshold ""

Prevent a specific build from being deleted

When you enable automatic build deletion, you may want to prevent specific builds from being automatically deleted (for instance, iteration or milestone builds).

  1. If you're not viewing the Projects list, click Projects at the top left.
  2. Click a project in the list. The project details are displayed.
  3. In the project details, click Builds.
  4. Click the pencil icon to the left of the build.
  5. Select do not auto-delete this build.
Tip: You can also use the Web API to specify which builds to keep.