Description

This page provides the details on wrong violations that are flagged for the Quality Rule "Avoid types that own disposable fields and are not disposable" on the dashboard.

Please refer to the screenshots below showing the issue:


Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
CSS(tick)
Step by Step Scenario

Below is the step-by-step scenario leading to the problem:

1. Package and deliver the source code with .NET assemblies.

2. Run analysis+snapshot

3. Open dashboard and observe the violations for "Avoid types that own disposable fields and are not disposable"

Impact of the Problem

The impact of the problem on the analysis or the dashboard is: The dashboard shows the violations for the source code where Brushes is used.

Details

It is expected to get violations for the QR "Avoid types that own disposable fields and are not disposable" where Brushes field is used in the source code of C Sharp. The reason for this being an expected behavior is given below:

 The violation is considering the Brushes type but this type should not be considered because the type of the field is Brush, not Brushes. Brushes does not inherit from IDisposable, but Brush does. So the violation is the expected behavior, this is not a wrong violation. 



Notes/comments
 Ticket #5807
Related Pages