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> {
32
32
}
33
33
}
34
34
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
+
35
43
module CallTargetStats implements StatsSig {
36
44
int getNumberOfOk ( ) { result = count ( Call c | exists ( c .getTarget ( ) ) ) }
37
45
@@ -40,7 +48,8 @@ module CallTargetStats implements StatsSig {
40
48
count ( Call c |
41
49
not exists ( c .getTarget ( ) ) and
42
50
not c instanceof DelegateCall and
43
- not c instanceof DynamicExpr
51
+ not c instanceof DynamicExpr and
52
+ not isNoSetterPropertyCallInConstructor ( c )
44
53
)
45
54
}
46
55
You can’t perform that action at this time.
0 commit comments