File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ module ReportStats<StatsSig Stats> {
3232 }
3333}
3434
35+ private predicate isNoSetterPropertyCallInConstructor ( PropertyCall c ) {
36+ exists ( Property p |
37+ p = c .getProperty ( ) and
38+ not exists ( Setter a | a = p .getAnAccessor ( ) ) and
39+ c .getEnclosingCallable ( ) .( Constructor ) .getDeclaringType ( ) .getASubType * ( ) = p .getDeclaringType ( )
40+ )
41+ }
42+
3543module CallTargetStats implements StatsSig {
3644 int getNumberOfOk ( ) { result = count ( Call c | exists ( c .getTarget ( ) ) ) }
3745
@@ -40,7 +48,8 @@ module CallTargetStats implements StatsSig {
4048 count ( Call c |
4149 not exists ( c .getTarget ( ) ) and
4250 not c instanceof DelegateCall and
43- not c instanceof DynamicExpr
51+ not c instanceof DynamicExpr and
52+ not isNoSetterPropertyCallInConstructor ( c )
4453 )
4554 }
4655
You can’t perform that action at this time.
0 commit comments