mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Autoformat
This commit is contained in:
@@ -1251,7 +1251,7 @@ class ClassInstanceExpr extends Expr, ConstructorCall, @classinstancexpr {
|
||||
override string getAPrimaryQlClass() { result = "ClassInstanceExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* An explicit `new ClassName(...)` expression.
|
||||
*
|
||||
* Note this does not include implicit instance creation such as lambda expressions
|
||||
|
||||
@@ -58,9 +58,7 @@ private predicate implicitEnclosingThisCopy(ConstructorCall cc, RefType t1, RefT
|
||||
private predicate enclosingInstanceAccess(ExprParent e, RefType t) {
|
||||
e.(InstanceAccess).isEnclosingInstanceAccess(t)
|
||||
or
|
||||
exists(MethodCall ma |
|
||||
ma.isEnclosingMethodCall(t) and ma = e and not exists(ma.getQualifier())
|
||||
)
|
||||
exists(MethodCall ma | ma.isEnclosingMethodCall(t) and ma = e and not exists(ma.getQualifier()))
|
||||
or
|
||||
exists(FieldAccess fa | fa.isEnclosingFieldAccess(t) and fa = e and not exists(fa.getQualifier()))
|
||||
or
|
||||
|
||||
@@ -466,9 +466,7 @@ class ObjectOutputStreamVar extends LocalVariableDecl {
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for `getAWriteObjectMethodCall`. */
|
||||
deprecated MethodCall getAWriteObjectMethodAccess() {
|
||||
result = this.getAWriteObjectMethodCall()
|
||||
}
|
||||
deprecated MethodCall getAWriteObjectMethodAccess() { result = this.getAWriteObjectMethodCall() }
|
||||
}
|
||||
|
||||
/** Flow through string formatting. */
|
||||
|
||||
@@ -78,9 +78,7 @@ class MockitoInitedTest extends Class {
|
||||
m.calls*(initMocks)
|
||||
)
|
||||
or
|
||||
exists(MethodCall call | call.getCallee() = initMocks |
|
||||
call.getArgument(0).getType() = this
|
||||
)
|
||||
exists(MethodCall call | call.getCallee() = initMocks | call.getArgument(0).getType() = this)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,9 +158,8 @@ private class IsUnixFromPosixFromFileSystem extends IsUnixGuard instanceof Metho
|
||||
supportedFileAttributeViewsMethod.hasName("supportedFileAttributeViews") and
|
||||
supportedFileAttributeViewsMethod.getDeclaringType() instanceof TypeFileSystem
|
||||
|
|
||||
DataFlow::localExprFlow(any(MethodCall ma |
|
||||
ma.getMethod() = supportedFileAttributeViewsMethod
|
||||
), super.getQualifier())
|
||||
DataFlow::localExprFlow(any(MethodCall ma | ma.getMethod() = supportedFileAttributeViewsMethod),
|
||||
super.getQualifier())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,7 @@ private predicate directFileRead(Expr fileAccess, Expr fileReadingExpr) {
|
||||
.hasQualifiedName("java.io", ["RandomAccessFile", "FileReader", "FileInputStream"])
|
||||
)
|
||||
or
|
||||
exists(MethodCall ma, Method filesMethod |
|
||||
ma = fileReadingExpr and filesMethod = ma.getMethod()
|
||||
|
|
||||
exists(MethodCall ma, Method filesMethod | ma = fileReadingExpr and filesMethod = ma.getMethod() |
|
||||
(
|
||||
// Identify all method calls on the `Files` class that imply that we are reading the file
|
||||
// represented by the first argument.
|
||||
|
||||
@@ -18,9 +18,7 @@ deprecated class EqualsAccess = EqualsCall;
|
||||
/**
|
||||
* Holds if `sink` compares password `p` against a hardcoded expression `source`.
|
||||
*/
|
||||
predicate isHardcodedCredentialsComparison(
|
||||
EqualsCall sink, HardcodedExpr source, PasswordVariable p
|
||||
) {
|
||||
predicate isHardcodedCredentialsComparison(EqualsCall sink, HardcodedExpr source, PasswordVariable p) {
|
||||
source = sink.getQualifier() and
|
||||
p.getAnAccess() = sink.getArgument(0)
|
||||
or
|
||||
|
||||
@@ -60,4 +60,4 @@ class PartialPathTraversalMethodCall extends MethodCall {
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for `PartialPathTraversalMethodCall`. */
|
||||
deprecated class PartialPathTraversalMethodAccess = PartialPathTraversalMethodCall;
|
||||
deprecated class PartialPathTraversalMethodAccess = PartialPathTraversalMethodCall;
|
||||
|
||||
@@ -260,4 +260,5 @@ class MethodCallInsecureGuavaFilesCreateTempFile extends MethodCallInsecureFileC
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for `MethodCallInsecureGuavaFilesCreateTempFile`. */
|
||||
deprecated class MethodAccessInsecureGuavaFilesCreateTempFile = MethodCallInsecureGuavaFilesCreateTempFile;
|
||||
deprecated class MethodAccessInsecureGuavaFilesCreateTempFile =
|
||||
MethodCallInsecureGuavaFilesCreateTempFile;
|
||||
|
||||
Reference in New Issue
Block a user