mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
16 lines
326 B
Plaintext
16 lines
326 B
Plaintext
/**
|
|
* @name Test for constants
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from MemberConstant c
|
|
where
|
|
c.getName() = "X" and
|
|
c.getDeclaringType().hasQualifiedName("Constants.A") and
|
|
c.getType() instanceof IntType and
|
|
c.getInitializer() instanceof BinaryOperation and
|
|
c.isPublic() and
|
|
c.getValue() = "12"
|
|
select c, c.getType().toString()
|