@@ -47,16 +47,16 @@ abstract class SuccessMetric extends ExtractionMetric {
4747 * A metric used to report database quality.
4848 */
4949class QualityMetric extends Metric {
50- BaseMetric base_metric ;
51- SuccessMetric relative_metric ;
50+ BaseMetric baseMetric ;
51+ SuccessMetric relativeMetric ;
5252
5353 QualityMetric ( ) {
54- base_metric = relative_metric .getBaseline ( ) and this = "Percentage of " + relative_metric
54+ baseMetric = relativeMetric .getBaseline ( ) and this = "Percentage of " + relativeMetric
5555 }
5656
5757 float getValue ( ) {
58- base_metric .getValue ( ) > 0 and
59- result = 100.0 * relative_metric .getValue ( ) / base_metric .getValue ( )
58+ baseMetric .getValue ( ) > 0 and
59+ result = 100.0 * relativeMetric .getValue ( ) / baseMetric .getValue ( )
6060 }
6161}
6262
@@ -70,8 +70,8 @@ module RankMetric<RankedMetric M> {
7070
7171/** Various metrics we want to report. */
7272module CppMetrics {
73- class CompilationUnits extends BaseMetric {
74- CompilationUnits ( ) { this = "compilation units " }
73+ class Compilations extends BaseMetric {
74+ Compilations ( ) { this = "compilations " }
7575
7676 override int getValue ( ) { result = count ( Compilation c ) }
7777 }
@@ -92,14 +92,14 @@ module CppMetrics {
9292 override SourceFiles getBaseline ( ) { any ( ) }
9393 }
9494
95- class CompilationUnitsWithoutErrors extends SuccessMetric {
96- CompilationUnitsWithoutErrors ( ) { this = "compilation units without errors" }
95+ class CompilationsWithoutErrors extends SuccessMetric {
96+ CompilationsWithoutErrors ( ) { this = "compilations without errors" }
9797
9898 override int getValue ( ) {
9999 result = count ( Compilation c | not exists ( Diagnostic d | d .getFile ( ) = c .getAFileCompiled ( ) ) )
100100 }
101101
102- override CompilationUnits getBaseline ( ) { any ( ) }
102+ override Compilations getBaseline ( ) { any ( ) }
103103 }
104104
105105 class Expressions extends BaseMetric {
@@ -186,7 +186,7 @@ module CppMetrics {
186186 override int getValue ( ) {
187187 result =
188188 sum ( File f | | f .getMetrics ( ) .getNumberOfLinesOfCode ( ) ) -
189- count ( File file , int line | errorLine ( file , line ) )
189+ count ( File f , int line | errorLine ( f , line ) )
190190 }
191191
192192 override LinesOfCode getBaseline ( ) { any ( ) }
@@ -209,7 +209,7 @@ module CppMetrics {
209209 class Includes extends BaseMetric {
210210 Includes ( ) { this = "#include directives" }
211211
212- override int getValue ( ) { result = count ( Include i ) + count ( CannotOpenFile e ) }
212+ override int getValue ( ) { result = count ( Include i ) + count ( CannotOpenFileError e ) }
213213 }
214214
215215 class SucceededIncludes extends SuccessMetric {
@@ -240,11 +240,11 @@ module CppMetrics {
240240 string include_text ;
241241
242242 MissingIncludeCount ( ) {
243- exists ( CannotOpenFile e | e .getIncludedFile ( ) = include_text ) and
243+ exists ( CannotOpenFileError e | e .getIncludedFile ( ) = include_text ) and
244244 this = "Failed to include '" + include_text + "'"
245245 }
246246
247- int getValue ( ) { result = count ( CannotOpenFile e | e .getIncludedFile ( ) = include_text ) }
247+ int getValue ( ) { result = count ( CannotOpenFileError e | e .getIncludedFile ( ) = include_text ) }
248248
249249 string getIncludeText ( ) { result = include_text }
250250 }
0 commit comments