mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
JS: Autoformat
This commit is contained in:
@@ -60,8 +60,7 @@ class AmdModuleDefinition extends CallExpr {
|
|||||||
result instanceof DataFlow::ValueNode
|
result instanceof DataFlow::ValueNode
|
||||||
}
|
}
|
||||||
|
|
||||||
private
|
private DataFlow::Node getFactoryNodeInternal() {
|
||||||
DataFlow::Node getFactoryNodeInternal() {
|
|
||||||
result = DataFlow::valueNode(getLastArgument()) or
|
result = DataFlow::valueNode(getLastArgument()) or
|
||||||
result = getFactoryNodeInternal().getAPredecessor()
|
result = getFactoryNodeInternal().getAPredecessor()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ module LazyCache {
|
|||||||
*
|
*
|
||||||
* A lazy-cache object, usually created through an expression of form `require('lazy-cache')(require)`.
|
* A lazy-cache object, usually created through an expression of form `require('lazy-cache')(require)`.
|
||||||
*/
|
*/
|
||||||
deprecated
|
deprecated class LazyCacheObject extends DataFlow::SourceNode {
|
||||||
class LazyCacheObject extends DataFlow::SourceNode {
|
|
||||||
LazyCacheObject() {
|
LazyCacheObject() {
|
||||||
// Use `require` directly instead of `moduleImport` to avoid recursion.
|
// Use `require` directly instead of `moduleImport` to avoid recursion.
|
||||||
// For the same reason, avoid `Import.getImportedPath`.
|
// For the same reason, avoid `Import.getImportedPath`.
|
||||||
@@ -55,9 +54,7 @@ module LazyCache {
|
|||||||
|
|
||||||
override PathExpr getImportedPath() { result = getArgument(0) }
|
override PathExpr getImportedPath() { result = getArgument(0) }
|
||||||
|
|
||||||
private LazyCacheVariable getVariable() {
|
private LazyCacheVariable getVariable() { result = cache }
|
||||||
result = cache
|
|
||||||
}
|
|
||||||
|
|
||||||
pragma[noopt]
|
pragma[noopt]
|
||||||
override DataFlow::Node getImportedModuleNode() {
|
override DataFlow::Node getImportedModuleNode() {
|
||||||
|
|||||||
Reference in New Issue
Block a user