@@ -145,6 +145,16 @@ module AccessTargetStats implements StatsSig {
145145 string getNotOkText ( ) { result = "access with missing target" }
146146}
147147
148+ module ExprStats implements StatsSig {
149+ int getNumberOfOk ( ) { result = count ( Expr e | not e instanceof @unknown_expr) }
150+
151+ int getNumberOfNotOk ( ) { result = count ( Expr e | e instanceof @unknown_expr) }
152+
153+ string getOkText ( ) { result = "expressions with known kind" }
154+
155+ string getNotOkText ( ) { result = "expressions with unknown kind" }
156+ }
157+
148158module CallTargetStatsReport = ReportStats< CallTargetStats > ;
149159
150160module ExprTypeStatsReport = ReportStats< ExprTypeStats > ;
@@ -153,6 +163,8 @@ module TypeMentionTypeStatsReport = ReportStats<TypeMentionTypeStats>;
153163
154164module AccessTargetStatsReport = ReportStats< AccessTargetStats > ;
155165
166+ module ExprStatsReport = ReportStats< ExprStats > ;
167+
156168from string key , float value
157169where
158170 fileCount ( key , value ) or
@@ -176,5 +188,8 @@ where
176188 TypeMentionTypeStatsReport:: percentageOfOk ( key , value ) or
177189 AccessTargetStatsReport:: numberOfOk ( key , value ) or
178190 AccessTargetStatsReport:: numberOfNotOk ( key , value ) or
179- AccessTargetStatsReport:: percentageOfOk ( key , value )
191+ AccessTargetStatsReport:: percentageOfOk ( key , value ) or
192+ ExprStatsReport:: numberOfOk ( key , value ) or
193+ ExprStatsReport:: numberOfNotOk ( key , value ) or
194+ ExprStatsReport:: percentageOfOk ( key , value )
180195select key , value
0 commit comments