File tree Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 99import Metrics
1010
1111from CppMetrics:: ErrorCount m
12+ where RankMetric< CppMetrics:: ErrorCount > :: getRank ( m ) <= 500
1213select m .toString ( ) , m .getValue ( )
Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ class QualityMetric extends Metric {
6060 }
6161}
6262
63+ signature class RankedMetric extends Metric {
64+ int getValue ( ) ;
65+ }
66+
67+ module RankMetric< RankedMetric M> {
68+ int getRank ( M s ) { s = rank [ result ] ( M m | | m order by m .getValue ( ) desc ) }
69+ }
70+
6371/** Various metrics we want to report. */
6472module CppMetrics {
6573 class CompilationUnits extends BaseMetric {
Original file line number Diff line number Diff line change 99import Metrics
1010
1111from CppMetrics:: MissingIncludeCount e
12+ where RankMetric< CppMetrics:: MissingIncludeCount > :: getRank ( e ) <= 500
1213select e .getIncludeText ( ) , e .getValue ( )
Original file line number Diff line number Diff line change 99import Metrics
1010
1111from CppMetrics:: SucceededIncludeCount m
12+ where RankMetric< CppMetrics:: SucceededIncludeCount > :: getRank ( m ) <= 500
1213select m .getIncludeText ( ) , m .getValue ( )
You can’t perform that action at this time.
0 commit comments