mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
JS: Address comments
This commit is contained in:
@@ -100,7 +100,7 @@ module GlobalAccessPath {
|
||||
* foo = foo || {};
|
||||
* ```
|
||||
*/
|
||||
predicate isSelfAssignment(DataFlow::Node rhs) {
|
||||
private predicate isSelfAssignment(DataFlow::Node rhs) {
|
||||
fromRhs(rhs) = fromReference(rhs)
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ module GlobalAccessPath {
|
||||
* Holds if there is an assignment to `accessPath` in `file`, not counting
|
||||
* self-assignments.
|
||||
*/
|
||||
predicate isAssignedInFile(string accessPath, File file) {
|
||||
private predicate isAssignedInFile(string accessPath, File file) {
|
||||
exists(DataFlow::Node rhs |
|
||||
fromRhs(rhs) = accessPath and
|
||||
not isSelfAssignment(rhs) and
|
||||
|
||||
@@ -466,7 +466,7 @@ module JSDoc {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the alises declared in this environment should be in scope
|
||||
* Holds if the aliases declared in this environment should be in scope
|
||||
* within the given container.
|
||||
*
|
||||
* Specifically, this holds if this environment declares at least one
|
||||
|
||||
@@ -172,8 +172,8 @@ module DataFlow {
|
||||
* has `e` as its immediate predecessor, even if the function can fall over the
|
||||
* end and return `undefined`.
|
||||
*
|
||||
* - A destructuring property pattern with a default value has both the `PropRead`
|
||||
* and its default value as immediate predecessors.
|
||||
* - A destructuring property pattern or element pattern with a default value has
|
||||
* both the `PropRead` and its default value as immediate predecessors.
|
||||
*/
|
||||
cached
|
||||
DataFlow::Node getImmediatePredecessor() {
|
||||
@@ -1158,7 +1158,7 @@ module DataFlow {
|
||||
* For example, in `let { p: value } = f()`, the `value` pattern maps to a `PropRead`
|
||||
* extracting the `p` property.
|
||||
*/
|
||||
DataFlow::PropRead patternPropRead(BindingPattern value) {
|
||||
private DataFlow::PropRead patternPropRead(BindingPattern value) {
|
||||
exists(PropertyPattern prop |
|
||||
value = prop.getValuePattern() and
|
||||
result = TPropNode(prop)
|
||||
|
||||
Reference in New Issue
Block a user