mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
22 lines
491 B
Plaintext
22 lines
491 B
Plaintext
import csharp
|
|
import semmle.code.csharp.dataflow.SignAnalysis
|
|
|
|
string getASignString(ControlFlow::Nodes::ExprNode e) {
|
|
positive(e) and
|
|
not strictlyPositive(e) and
|
|
result = "positive"
|
|
or
|
|
negative(e) and
|
|
not strictlyNegative(e) and
|
|
result = "negative"
|
|
or
|
|
strictlyPositive(e) and
|
|
result = "strictlyPositive"
|
|
or
|
|
strictlyNegative(e) and
|
|
result = "strictlyNegative"
|
|
}
|
|
|
|
from ControlFlow::Nodes::ExprNode e
|
|
select e, strictconcat(string s | s = getASignString(e) | s, " ")
|