mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
DataFlow: Sync identical files.
This commit is contained in:
@@ -58,6 +58,9 @@ module Consistency {
|
|||||||
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `n` should be excluded from the consistency test `identityLocalStep`. */
|
||||||
|
predicate identityLocalStepExclude(Node n) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -287,4 +290,10 @@ module Consistency {
|
|||||||
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
||||||
msg = "Non-unique content approximation."
|
msg = "Non-unique content approximation."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate identityLocalStep(Node n, string msg) {
|
||||||
|
simpleLocalFlowStep(n, n) and
|
||||||
|
not any(ConsistencyConfiguration c).identityLocalStepExclude(n) and
|
||||||
|
msg = "Node steps to itself"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ module Consistency {
|
|||||||
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `n` should be excluded from the consistency test `identityLocalStep`. */
|
||||||
|
predicate identityLocalStepExclude(Node n) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -287,4 +290,10 @@ module Consistency {
|
|||||||
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
||||||
msg = "Non-unique content approximation."
|
msg = "Non-unique content approximation."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate identityLocalStep(Node n, string msg) {
|
||||||
|
simpleLocalFlowStep(n, n) and
|
||||||
|
not any(ConsistencyConfiguration c).identityLocalStepExclude(n) and
|
||||||
|
msg = "Node steps to itself"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ module Consistency {
|
|||||||
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `n` should be excluded from the consistency test `identityLocalStep`. */
|
||||||
|
predicate identityLocalStepExclude(Node n) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -287,4 +290,10 @@ module Consistency {
|
|||||||
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
||||||
msg = "Non-unique content approximation."
|
msg = "Non-unique content approximation."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate identityLocalStep(Node n, string msg) {
|
||||||
|
simpleLocalFlowStep(n, n) and
|
||||||
|
not any(ConsistencyConfiguration c).identityLocalStepExclude(n) and
|
||||||
|
msg = "Node steps to itself"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ module Consistency {
|
|||||||
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `n` should be excluded from the consistency test `identityLocalStep`. */
|
||||||
|
predicate identityLocalStepExclude(Node n) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -287,4 +290,10 @@ module Consistency {
|
|||||||
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
||||||
msg = "Non-unique content approximation."
|
msg = "Non-unique content approximation."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate identityLocalStep(Node n, string msg) {
|
||||||
|
simpleLocalFlowStep(n, n) and
|
||||||
|
not any(ConsistencyConfiguration c).identityLocalStepExclude(n) and
|
||||||
|
msg = "Node steps to itself"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ module Consistency {
|
|||||||
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `n` should be excluded from the consistency test `identityLocalStep`. */
|
||||||
|
predicate identityLocalStepExclude(Node n) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -287,4 +290,10 @@ module Consistency {
|
|||||||
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
||||||
msg = "Non-unique content approximation."
|
msg = "Non-unique content approximation."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate identityLocalStep(Node n, string msg) {
|
||||||
|
simpleLocalFlowStep(n, n) and
|
||||||
|
not any(ConsistencyConfiguration c).identityLocalStepExclude(n) and
|
||||||
|
msg = "Node steps to itself"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ module Consistency {
|
|||||||
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
|
||||||
none()
|
none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds if `n` should be excluded from the consistency test `identityLocalStep`. */
|
||||||
|
predicate identityLocalStepExclude(Node n) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -287,4 +290,10 @@ module Consistency {
|
|||||||
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
|
||||||
msg = "Non-unique content approximation."
|
msg = "Non-unique content approximation."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate identityLocalStep(Node n, string msg) {
|
||||||
|
simpleLocalFlowStep(n, n) and
|
||||||
|
not any(ConsistencyConfiguration c).identityLocalStepExclude(n) and
|
||||||
|
msg = "Node steps to itself"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user