mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
C#: Fix some Ql4Ql violations.
This commit is contained in:
@@ -12,7 +12,7 @@ module CallTargetStats implements StatsSig {
|
||||
private predicate isNoSetterPropertyCallInConstructor(PropertyCall c) {
|
||||
exists(Property p, Constructor ctor |
|
||||
p = c.getProperty() and
|
||||
not exists(Setter a | a = p.getAnAccessor()) and
|
||||
not p.getAnAccessor() instanceof Setter and
|
||||
c.getEnclosingCallable() = ctor and
|
||||
(
|
||||
c.hasThisQualifier()
|
||||
@@ -25,7 +25,7 @@ module CallTargetStats implements StatsSig {
|
||||
private predicate isNoSetterPropertyInitialization(PropertyCall c) {
|
||||
exists(Property p, AssignExpr assign |
|
||||
p = c.getProperty() and
|
||||
not exists(Setter a | a = p.getAnAccessor()) and
|
||||
not p.getAnAccessor() instanceof Setter and
|
||||
assign = c.getParent() and
|
||||
assign.getLValue() = c and
|
||||
assign.getParent() instanceof Property
|
||||
|
||||
Reference in New Issue
Block a user