Skip to content

Commit ac2769c

Browse files
committed
C#: Update the Telemetry queries such that properties with both get and set are no longer interesting.
1 parent 829557f commit ac2769c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

csharp/ql/src/Telemetry/ExternalApi.qll

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ private import TestLibrary
1313

1414
/** Holds if the given callable is not worth supporting. */
1515
private predicate isUninteresting(Callable c) {
16-
c.getDeclaringType() instanceof TestLibrary or
16+
c.getDeclaringType() instanceof TestLibrary
17+
or
1718
c.(Constructor).isParameterless()
19+
or
20+
// The data flow library uses read/store steps for properties, so we don't need to model them,
21+
// if both a getter and a setter exist.
22+
exists(Property p | p = c.(Accessor).getDeclaration() |
23+
exists(p.getSetter()) and exists(p.getGetter())
24+
)
1825
}
1926

2027
/**

0 commit comments

Comments
 (0)