Setting Rational Team Concert file delivery to validate static code analysis rules

You can configure Rational Team Concert™ file delivery to validate static code analysis rules before files are delivered to your team repository.

Before you begin

You must have Rational Team Concert client installed for this feature to be available.

Integration with Rational Team Concert takes place in your repository project area settings. You must have the proper authority to edit project area settings to be able to complete this task.

Procedure

  1. Open a project area or process template:
    • In the Team Artifacts view or Team Organization view, right-click a project area.
    • In the Process Templates view, right-click a template.
  2. Then click Open. The project area or process template opens in the editor view.
  3. In a project area or process template, click the Process Configuration tab.
  4. Expand the Project Configuration section and click the Operation Behavior section.
  5. From the Operations list, select Source Control > Deliver (client) and then select the icon in the Everyone (default) list or column.
  6. From the Preconditions list, click Add.
  7. In the Add Preconditions dialog box, select Require Satisfactory Software Analyzer Result and then click OK.
  8. From the Preconditions list, ensure that Require Satisfactory Software Analyzer Result is selected. This will cause the precondition description area to populate with settings that are specific to Software Analyzer.
  9. From the precondition description area Rules list, select the Software Analyzer rules that you want applied to all code delivery. When you click on a rule, the properties for that rule are shown in the box below and can be customized there.
  10. Select the Severity Threshold for gating delivery. Code delivery will be prevented if any rules with a severity level at or above the selected threshold are violated. Only rules that have a severity level will be affected by the Severity Threshold setting.
  11. Save the changes made to the project area or process template.

Results

With Software Analyzer rules enabled in the project area like this, every time a team member tries to deliver files, the files that are being delivered will be analyzed for the selected rules. If the files are in violation of the selected rules, the delivery action will fail and the Team Advisor view will open, indicating that static analysis has resulted in violations. To be able to deliver the files, you must first fix the code so that it does not break the static analysis rules.

Feedback