Changing an issue's status to show how it should be handled
For a real defect, fix the issue in your code. While working in Visual Studio, the Klocwork plug-in handles issues as follows:
- For C/C++ files, the detected issue disappears as soon as you finish typing the correction.
- For C# files, run the analysis on the project or solution again. If the defect disappears from the list, it's fixed.
The exception to this behavior is if you are fixing a server issue. Server issues remain in the issues list until the next integration build runs.
Citing issues
For your remaining issues, you can set different issue statuses (called citing) that cover several scenarios. Using statuses such as Not a Problem, Ignore, or Defer is a handy way to suppress issues in your results that you don't care about (often in third-party libraries).
You can change the status for one issue at a time for selected issues, or for an entire file. You need the Change Issue Status permission to change issue status. For connected projects, status updates are synchronized to the server. Your local project is also updated with changes made by other developers.
- Right-click an issue in the issue window or the red
or yellow
chevron icon in the left gutter, click Cite issue and select the appropriate issue state from the list of choices.
- Type a comment in the dialog box that appears to provide additional information. Use Ctrl + S to save changes and close the dialog. Press ESC to close the dialog without saving.
- Click
and the issue disappears from the list.
If you prefer to simply ignore an issue without specifying a more specific status, right-click the issue and select Ignore Issue. If you want to restore an ignored issue, right-click the issue(s) you want to restore and select Recover Issue.
If you have hidden the comment dialog but want to re-enable it, go to Klocwork > Options, click the Appearance tab and select Show change comment dialog
Showing ignored issues
Default filtering options hide all issues in statuses other than Analyze and Fix, so once you change an issue's status to something other than Analyze or Fix, you won't see it again. You can adjust your filter settings to show ignored issues: click the icon and select an ignored status.
Discarding issues (CI builds only)
If you configure Continuous Integration (CI) builds and open an issue in Visual Studio using the 'open in IDE' button from one of the supported CI plug-ins, this imports the issue into your open project. If you have fixed this issue or simply want to remove it from your issue list, you can right-click the issue and select Discard this issue. Note that this functionality does not apply to issues found from a full analysis; you cannot discard these issues.