Purpose of Query
This query provides the number of violation occurrences by quality rule
Applicable CAST Version
Release | Yes/No |
---|---|
8.3.x | |
8.2.x |
Applicable RDBMS
RDBMS | Yes/No |
---|---|
CSS4 | |
CSS3 | |
CSS2 |
Query for CSS
SELECT distinct dob.object_name, dmr.snapshot_id, dss.snapshot_date, dmr.metric_id, dmt.metric_name, count(DISTINCT dcb.local_position_id) bookmark_count FROM dss_metric_results dmr, dss_code_bookmarks dcb, dss_metric_types dmt, dss_snapshots dss, dss_objects dob WHERE dcb.position_id=dmr.position_id AND dmr.metric_id=dmt.metric_id AND dss.snapshot_id=dmr.snapshot_id AND dob.object_type_id = -102 and dob.object_id = dss.application_id AND dmr.snapshot_id= (SELECT max(snapshot_id) FROM dss_snapshots) GROUP BY dmr.metric_id, dmt.metric_name, dmr.snapshot_id, dss.snapshot_date, dob.object_name
Query result example
"APP name" 5 "2021-07-09 14:24:11.991846" 3613 "Avoid missing release of SQL connection after an effective lifetime (C#, VB.NET)" 5019
"APP name" 5 "2021-07-09 14:24:11.991846" 7271 "Declare as Static all methods not using instance members (.NET)" 5693
"APP name" 5 "2021-07-09 14:24:11.991846" 7271 "Declare as Static all methods not using instance members (.NET)" 5693
Query result interpretation
The query returns the application name, snapshot id, snapshot date, quality rule d, quality rule name and number of violation occurrences
Notes/comments
Ticket # 25747
Related Pages