mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
C#: Address review comments.
This commit is contained in:
@@ -19,7 +19,7 @@ where
|
||||
fw.getTarget() = f and
|
||||
f.isStatic() and
|
||||
c = fw.getEnclosingCallable() and
|
||||
not exists(Member m | m = c or m = c.(Accessor).getDeclaration() | m.isStatic()) and
|
||||
not [c.(Member), c.(Accessor).getDeclaration()].isStatic() and
|
||||
f.getDeclaringType() = c.getDeclaringType() and
|
||||
c.fromSource()
|
||||
select fw.(VariableAccess), "Write to static field from instance method, property or constructor."
|
||||
select fw.(VariableAccess), "Write to static field from instance method, property, or constructor."
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
| StaticFieldWrittenByInstance.cs:15:9:15:19 | access to field staticField | Write to static field from instance method, property or constructor. |
|
||||
| StaticFieldWrittenByInstance.cs:26:9:26:19 | access to field staticField | Write to static field from instance method, property or constructor. |
|
||||
| StaticFieldWrittenByInstance.cs:43:37:43:48 | access to field backingField | Write to static field from instance method, property or constructor. |
|
||||
| StaticFieldWrittenByInstance.cs:15:9:15:19 | access to field staticField | Write to static field from instance method, property, or constructor. |
|
||||
| StaticFieldWrittenByInstance.cs:26:9:26:19 | access to field staticField | Write to static field from instance method, property, or constructor. |
|
||||
| StaticFieldWrittenByInstance.cs:43:37:43:48 | access to field backingField | Write to static field from instance method, property, or constructor. |
|
||||
|
||||
Reference in New Issue
Block a user