mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
@@ -77,7 +77,7 @@ VarAccess getFirstCandidateAccess(ImportDeclaration decl) {
|
||||
result =
|
||||
min(decl.getASpecifier().getLocal().getVariable().getAnAccess().(CandidateVarAccess) as p
|
||||
order by
|
||||
p.getFirstToken().getIndex()
|
||||
p.getLocation().getStartLine(), p.getLocation().getStartColumn()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1609,7 +1609,9 @@ private string getConcatenatedString(Expr add) {
|
||||
strictconcat(Expr leaf |
|
||||
leaf = getAnAddOperand*(add)
|
||||
|
|
||||
getConstantString(leaf) order by leaf.getFirstToken().getIndex()
|
||||
getConstantString(leaf)
|
||||
order by
|
||||
leaf.getLocation().getStartLine(), leaf.getLocation().getStartColumn()
|
||||
) and
|
||||
result.length() < 1000 * 1000
|
||||
}
|
||||
|
||||
@@ -576,7 +576,9 @@ module StringOps {
|
||||
strictconcat(StringLiteralLike leaf |
|
||||
leaf = getALeaf().asExpr()
|
||||
|
|
||||
leaf.getStringValue() order by leaf.getFirstToken().getIndex()
|
||||
leaf.getStringValue()
|
||||
order by
|
||||
leaf.getLocation().getStartLine(), leaf.getLocation().getStartColumn()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,7 +466,11 @@ class LocalTypeName extends @local_type_name, LexicalName {
|
||||
* Gets the first declaration of this type name.
|
||||
*/
|
||||
TypeDecl getFirstDeclaration() {
|
||||
result = min(getADeclaration() as decl order by decl.getFirstToken().getIndex())
|
||||
result =
|
||||
min(getADeclaration() as decl
|
||||
order by
|
||||
decl.getLocation().getStartLine(), decl.getLocation().getStartColumn()
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets a use of this type name in a type annotation. */
|
||||
@@ -526,7 +530,11 @@ class LocalNamespaceName extends @local_namespace_name, LexicalName {
|
||||
* Gets the first declaration of this namespace name.
|
||||
*/
|
||||
LocalNamespaceDecl getFirstDeclaration() {
|
||||
result = min(getADeclaration() as decl order by decl.getFirstToken().getIndex())
|
||||
result =
|
||||
min(getADeclaration() as decl
|
||||
order by
|
||||
decl.getLocation().getStartLine(), decl.getLocation().getStartColumn()
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets a use of this namespace name in a type annotation. */
|
||||
|
||||
@@ -239,7 +239,9 @@ module PrettyPrintCatCall {
|
||||
concat(Expr leaf |
|
||||
leaf = root.getALeaf().asExpr()
|
||||
|
|
||||
createLeafRepresentation(leaf), " + " order by leaf.getFirstToken().getIndex()
|
||||
createLeafRepresentation(leaf), " + "
|
||||
order by
|
||||
leaf.getLocation().getStartLine(), leaf.getLocation().getStartColumn()
|
||||
)
|
||||
or
|
||||
// Template string
|
||||
|
||||
Reference in New Issue
Block a user