Rational Developer for System z

Steps for viewing results and fixing problems

This topic describes how to find the report generated by a code review and how to fix any problems listed in the report.
In the following steps it is assumed that you have created a software analysis configuration and that you have run it against a set of source code files, producing a report. For more detailed instructions for each step see the following links:
To review the results of a code review and to fix problems reported in the results:
  1. Open the Software Analyzer Results view.
  2. In the left pane click the history that you want to view. The most recent history is at the top of the list.

  3. In the right pane, in the toolbar, you can switch between two display modes:
    • Click Show all selected rules and results Show all selected rules and results to display all the rules that you selected in the analysis configuration, even if the code review found no violations of the rule in the source code.
    • Click Show only rules with results Show only rules with results to display only the selected rules for which the code review found violations in the source code.
  4. Expand a rule that contains results and view the results.

    Each result includes a severity icon, the name of the source code file, the beginning line number of the source code affected by the rule, and a statement of the rule.

  5. Right-click the result and click View Result.

    The source code file is opened in one of the supported editors and is positioned to show the lines of source code that are flagged by the result. The lines are temporarily selected so that they are highlighted. Icons are displayed in the left and right margins next to the first line of the affected area. Hovering the mouse over either icon displays the text of the rule.

  6. View the affected lines of source code. Make changes in the source code if you wish. Save your changes and close the editor.

  7. If you modified the source code to fix a problem flagged by the code review, run the code review again to see if the problem is fixed.


Feedback