Merge branch 'main' into param2

This commit is contained in:
Erik Krogh Kristensen
2022-07-12 23:21:11 +02:00
1424 changed files with 88659 additions and 55939 deletions

View File

@@ -6,7 +6,7 @@ import files.FileSystem
* A location as given by a file, a start line, a start column,
* an end line, and an end column.
*
* For more information about locations see [LGTM locations](https://lgtm.com/help/ql/locations).
* For more information about locations see [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
class Location extends @location {
/** Gets the file for this location. */
@@ -41,7 +41,7 @@ class Location extends @location {
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `filepath`.
* For more information, see
* [LGTM locations](https://lgtm.com/help/ql/locations).
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn

View File

@@ -146,7 +146,7 @@ abstract class Container extends @container {
/**
* Gets a URL representing the location of this container.
*
* For more information see https://lgtm.com/help/ql/locations#providing-urls.
* For more information see https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/#providing-urls.
*/
abstract string getURL();

View File

@@ -21,11 +21,13 @@ private string stringIndexedMember(string name, string index) {
class AstNode extends TAstNode {
string toString() { result = this.getAPrimaryQlClass() }
/**
* Gets the location of the AST node.
*/
/** Gets the location of the AST node. */
cached
Location getLocation() {
Location getLocation() { result = this.getFullLocation() } // overriden in some subclasses
/** Gets the location that spans the entire AST node. */
cached
final Location getFullLocation() {
exists(QL::AstNode node | not node instanceof QL::ParExpr |
node = toQL(this) and
result = node.getLocation()
@@ -434,6 +436,8 @@ class ClasslessPredicate extends TClasslessPredicate, Predicate, ModuleDeclarati
ClasslessPredicate() { this = TClasslessPredicate(pred) }
override Location getLocation() { result = pred.getName().getLocation() }
/**
* Gets the aliased value if this predicate is an alias
* E.g. for `predicate foo = Module::bar/2;` gets `Module::bar/2`.
@@ -484,6 +488,8 @@ class ClassPredicate extends TClassPredicate, Predicate {
ClassPredicate() { this = TClassPredicate(pred) }
override Location getLocation() { result = pred.getName().getLocation() }
override string getName() { result = pred.getName().getValue() }
override Formula getBody() { toQL(result) = pred.getChild(_).(QL::Body).getChild() }
@@ -701,6 +707,8 @@ class Module extends TModule, ModuleDeclaration {
Module() { this = TModule(mod) }
override Location getLocation() { result = mod.getName().getLocation() }
override string getAPrimaryQlClass() { result = "Module" }
override string getName() { result = mod.getName().getChild().getValue() }
@@ -784,6 +792,8 @@ class Class extends TClass, TypeDeclaration, ModuleDeclaration {
Class() { this = TClass(cls) }
override Location getLocation() { result = cls.getName().getLocation() }
override string getAPrimaryQlClass() { result = "Class" }
override string getName() { result = cls.getName().getValue() }
@@ -871,6 +881,8 @@ class NewType extends TNewType, TypeDeclaration, ModuleDeclaration {
NewType() { this = TNewType(type) }
override Location getLocation() { result = type.getName().getLocation() }
override string getName() { result = type.getName().getValue() }
override string getAPrimaryQlClass() { result = "NewType" }
@@ -896,6 +908,8 @@ class NewTypeBranch extends TNewTypeBranch, Predicate, TypeDeclaration {
NewTypeBranch() { this = TNewTypeBranch(branch) }
override Location getLocation() { result = branch.getName().getLocation() }
override string getAPrimaryQlClass() { result = "NewTypeBranch" }
override string getName() { result = branch.getName().getValue() }

View File

@@ -0,0 +1,24 @@
/**
* @name Inconsistent deprecation
* @description A deprecated predicate that overrides a non-deprecated predicate is an indication that the super-predicate should be deprecated.
* @kind problem
* @problem.severity warning
* @id ql/inconsistent-deprecation
* @tags correctness
* maintanability
* @precision very-high
*/
import ql
predicate overrides(ClassPredicate sub, ClassPredicate sup, string description, string overrides) {
sub.overrides(sup) and description = "predicate" and overrides = "predicate"
}
from AstNode sub, AstNode sup, string description, string overrides
where
overrides(sub, sup, description, overrides) and
sub.hasAnnotation("deprecated") and
not sup.hasAnnotation("deprecated")
select sub, "This deprecated " + description + " overrides $@. Consider deprecating both.", sup,
"a non-deprecated " + overrides

View File

@@ -119,12 +119,14 @@ class EffectiveDisjunction extends AstNode {
* Holds if `disj` only uses `var` in one of its branches.
*/
pragma[noinline]
predicate onlyUseInOneBranch(EffectiveDisjunction disj, VarDef var) {
predicate onlyUseInOneBranch(EffectiveDisjunction disj, VarDef var, AstNode notBoundIn) {
alwaysBindsVar(var, disj.getLeft()) and
not alwaysBindsVar(var, disj.getRight())
not alwaysBindsVar(var, disj.getRight()) and
notBoundIn = disj.getRight()
or
not alwaysBindsVar(var, disj.getLeft()) and
alwaysBindsVar(var, disj.getRight())
alwaysBindsVar(var, disj.getRight()) and
notBoundIn = disj.getLeft()
}
/**
@@ -170,7 +172,7 @@ class EffectiveConjunction extends AstNode {
predicate varIsAlwaysBound(VarDef var, AstNode node) {
// base case
alwaysBindsVar(var, node) and
onlyUseInOneBranch(_, var) // <- manual magic
onlyUseInOneBranch(_, var, _) // <- manual magic
or
// recursive cases
exists(AstNode parent | node.getParent() = parent | varIsAlwaysBound(var, parent))
@@ -194,8 +196,8 @@ predicate varIsAlwaysBound(VarDef var, AstNode node) {
* Holds if `disj` only uses `var` in one of its branches.
* And we should report it as being a bad thing.
*/
predicate badDisjunction(EffectiveDisjunction disj, VarDef var) {
onlyUseInOneBranch(disj, var) and
predicate badDisjunction(EffectiveDisjunction disj, VarDef var, AstNode notBoundIn) {
onlyUseInOneBranch(disj, var, notBoundIn) and
// it's fine if it's always bound further up
not varIsAlwaysBound(var, disj) and
// none() on one side makes everything fine. (this happens, it's a type-system hack)
@@ -213,9 +215,9 @@ predicate badDisjunction(EffectiveDisjunction disj, VarDef var) {
not isTinyAssignment(disj.getAnOperand())
}
from EffectiveDisjunction disj, VarDef var, string type
from EffectiveDisjunction disj, VarDef var, AstNode notBoundIn, string type
where
badDisjunction(disj, var) and
not badDisjunction(disj.getParent(), var) and // avoid duplicate reporting of the same error
badDisjunction(disj, var, notBoundIn) and
not badDisjunction(disj.getParent(), var, _) and // avoid duplicate reporting of the same error
if var.getParent() instanceof FieldDecl then type = "field" else type = "variable"
select disj, "The $@ is only used in one side of disjunct.", var, type + " " + var.getName()

View File

@@ -10,6 +10,9 @@
import ql
from AstNode n
where n.hasAnnotation("library") and not n.hasAnnotation("deprecated")
from AstNode n, Annotation library
where
library = n.getAnAnnotation() and
library.getName() = "library" and
not n.hasAnnotation("deprecated")
select n, "Don't use the library annotation."

View File

@@ -18,4 +18,4 @@ where
usesFieldBasedInstanceof(c, any(TypeExpr te | te.getResolvedType() = type), _, _)
) and
message = "consider defining $@ as non-extending subtype of $@"
select c, message, c, c.getName(), type, type.getName()
select c, message, c, c.getName(), type.getDeclaration(), type.getName()

View File

@@ -239,12 +239,24 @@ private string getColumnString(TColumn column) {
/**
* RegEx pattern to match a single expected result, not including the leading `$`. It consists of one or
* more comma-separated tags containing only letters, digits, `-` and `_` (note that the first character
* must not be a digit), optionally followed by `=` and the expected value.
* more comma-separated tags optionally followed by `=` and the expected value.
*
* Tags must be only letters, digits, `-` and `_` (note that the first character
* must not be a digit), but can contain anything enclosed in a single set of
* square brackets.
*
* Examples:
* - `tag`
* - `tag=value`
* - `tag,tag2=value`
* - `tag[foo bar]=value`
*
* Not allowed:
* - `tag[[[foo bar]`
*/
private string expectationPattern() {
exists(string tag, string tags, string value |
tag = "[A-Za-z-_][A-Za-z-_0-9]*" and
tag = "[A-Za-z-_](?:[A-Za-z-_0-9]|\\[[^\\]\\]]*\\])*" and
tags = "((?:" + tag + ")(?:\\s*,\\s*" + tag + ")*)" and
// In Python, we allow both `"` and `'` for strings, as well as the prefixes `bru`.
// For example, `b"foo"`.

View File

@@ -1,53 +1,53 @@
getTarget
| Bar.qll:5:38:5:47 | PredicateCall | Bar.qll:8:3:8:31 | ClasslessPredicate snapshot |
| Bar.qll:24:12:24:32 | MemberCall | Bar.qll:19:3:19:47 | ClassPredicate getParameter |
| Bar.qll:26:12:26:31 | MemberCall | Bar.qll:19:3:19:47 | ClassPredicate getParameter |
| Bar.qll:30:12:30:32 | MemberCall | Bar.qll:19:3:19:47 | ClassPredicate getParameter |
| Baz.qll:8:18:8:44 | MemberCall | Baz.qll:4:3:4:37 | ClassPredicate getImportedPath |
| Foo.qll:5:26:5:30 | PredicateCall | Foo.qll:3:1:3:26 | ClasslessPredicate foo |
| Foo.qll:10:21:10:25 | PredicateCall | Foo.qll:8:3:8:28 | ClassPredicate bar |
| Foo.qll:14:30:14:40 | MemberCall | Foo.qll:10:3:10:27 | ClassPredicate baz |
| Foo.qll:17:27:17:42 | MemberCall | Foo.qll:8:3:8:28 | ClassPredicate bar |
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:20:3:20:54 | ClasslessPredicate myThing2 |
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:26:3:26:32 | ClasslessPredicate alias2 |
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:22:3:22:32 | ClasslessPredicate myThing0 |
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:24:3:24:32 | ClasslessPredicate alias0 |
| Bar.qll:5:38:5:47 | PredicateCall | Bar.qll:8:7:8:14 | ClasslessPredicate snapshot |
| Bar.qll:24:12:24:32 | MemberCall | Bar.qll:19:7:19:18 | ClassPredicate getParameter |
| Bar.qll:26:12:26:31 | MemberCall | Bar.qll:19:7:19:18 | ClassPredicate getParameter |
| Bar.qll:30:12:30:32 | MemberCall | Bar.qll:19:7:19:18 | ClassPredicate getParameter |
| Baz.qll:8:18:8:44 | MemberCall | Baz.qll:4:10:4:24 | ClassPredicate getImportedPath |
| Foo.qll:5:26:5:30 | PredicateCall | Foo.qll:3:11:3:13 | ClasslessPredicate foo |
| Foo.qll:10:21:10:25 | PredicateCall | Foo.qll:8:13:8:15 | ClassPredicate bar |
| Foo.qll:14:30:14:40 | MemberCall | Foo.qll:10:13:10:15 | ClassPredicate baz |
| Foo.qll:17:27:17:42 | MemberCall | Foo.qll:8:13:8:15 | ClassPredicate bar |
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:20:13:20:20 | ClasslessPredicate myThing2 |
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:26:13:26:18 | ClasslessPredicate alias2 |
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:22:13:22:20 | ClasslessPredicate myThing0 |
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:24:13:24:18 | ClasslessPredicate alias0 |
| Foo.qll:36:36:36:65 | MemberCall | file://:0:0:0:0 | replaceAll |
| Foo.qll:38:39:38:67 | MemberCall | file://:0:0:0:0 | regexpCapture |
| MultiResolve.qll:14:25:14:35 | PredicateCall | MultiResolve.qll:1:1:4:1 | ClasslessPredicate foo |
| MultiResolve.qll:14:25:14:35 | PredicateCall | MultiResolve.qll:12:1:12:24 | ClasslessPredicate myFoo |
| MultiResolve.qll:23:7:23:18 | PredicateCall | MultiResolve.qll:17:3:17:27 | ClasslessPredicate bar |
| MultiResolve.qll:41:30:41:47 | MemberCall | MultiResolve.qll:31:3:31:27 | ClassPredicate foo |
| MultiResolve.qll:49:3:49:12 | PredicateCall | MultiResolve.qll:45:3:45:27 | ClasslessPredicate foo |
| MultiResolve.qll:53:30:53:47 | MemberCall | MultiResolve.qll:37:3:37:28 | ClassPredicate foo |
| MultiResolve.qll:56:5:56:14 | MemberCall | MultiResolve.qll:53:12:53:49 | ClassPredicate foo |
| Overrides.qll:8:30:8:39 | MemberCall | Overrides.qll:6:3:6:29 | ClassPredicate bar |
| Overrides.qll:16:39:16:48 | MemberCall | Overrides.qll:14:12:14:43 | ClassPredicate bar |
| Overrides.qll:24:39:24:48 | MemberCall | Overrides.qll:22:12:22:44 | ClassPredicate bar |
| Overrides.qll:28:3:28:9 | MemberCall | Overrides.qll:6:3:6:29 | ClassPredicate bar |
| Overrides.qll:29:3:29:10 | MemberCall | Overrides.qll:8:3:8:41 | ClassPredicate baz |
| ParamModules.qll:5:28:5:41 | PredicateCall | ParamModules.qll:2:13:2:36 | ClasslessPredicate fooSig |
| ParamModules.qll:5:28:5:41 | PredicateCall | ParamModules.qll:8:3:8:35 | ClasslessPredicate myFoo |
| ParamModules.qll:10:26:10:49 | PredicateCall | ParamModules.qll:5:5:5:43 | ClasslessPredicate bar |
| ParamModules.qll:26:27:26:53 | PredicateCall | ParamModules.qll:17:5:17:42 | ClasslessPredicate getAnEven |
| ParamModules.qll:26:27:26:61 | MemberCall | ParamModules.qll:23:5:23:39 | ClassPredicate myFoo |
| ParamModules.qll:37:29:37:47 | PredicateCall | ParamModules.qll:33:5:33:17 | ClasslessPredicate getThing |
| ParamModules.qll:37:29:37:47 | PredicateCall | ParamModules.qll:51:5:51:26 | ClasslessPredicate getThing |
| ParamModules.qll:59:30:59:45 | PredicateCall | ParamModules.qll:37:5:37:49 | ClasslessPredicate getThing |
| ParamModules.qll:59:30:59:53 | MemberCall | ParamModules.qll:46:7:46:41 | ClassPredicate myFoo |
| ParamModules.qll:61:39:61:47 | MemberCall | ParamModules.qll:46:7:46:41 | ClassPredicate myFoo |
| packs/other/OtherThing.qll:5:3:5:8 | PredicateCall | packs/lib/LibThing/Foo.qll:1:1:1:30 | ClasslessPredicate foo |
| packs/other/OtherThing.qll:6:3:6:8 | PredicateCall | packs/src/SrcThing.qll:8:1:8:30 | ClasslessPredicate bar |
| packs/src/SrcThing.qll:4:3:4:8 | PredicateCall | packs/lib/LibThing/Foo.qll:1:1:1:30 | ClasslessPredicate foo |
| packs/src/SrcThing.qll:5:3:5:8 | PredicateCall | packs/src/SrcThing.qll:8:1:8:30 | ClasslessPredicate bar |
| MultiResolve.qll:14:25:14:35 | PredicateCall | MultiResolve.qll:1:11:1:13 | ClasslessPredicate foo |
| MultiResolve.qll:14:25:14:35 | PredicateCall | MultiResolve.qll:12:11:12:15 | ClasslessPredicate myFoo |
| MultiResolve.qll:23:7:23:18 | PredicateCall | MultiResolve.qll:17:13:17:15 | ClasslessPredicate bar |
| MultiResolve.qll:41:30:41:47 | MemberCall | MultiResolve.qll:31:13:31:15 | ClassPredicate foo |
| MultiResolve.qll:49:3:49:12 | PredicateCall | MultiResolve.qll:45:13:45:15 | ClasslessPredicate foo |
| MultiResolve.qll:53:30:53:47 | MemberCall | MultiResolve.qll:37:13:37:15 | ClassPredicate foo |
| MultiResolve.qll:56:5:56:14 | MemberCall | MultiResolve.qll:53:22:53:24 | ClassPredicate foo |
| Overrides.qll:8:30:8:39 | MemberCall | Overrides.qll:6:7:6:9 | ClassPredicate bar |
| Overrides.qll:16:39:16:48 | MemberCall | Overrides.qll:14:16:14:18 | ClassPredicate bar |
| Overrides.qll:24:39:24:48 | MemberCall | Overrides.qll:22:16:22:18 | ClassPredicate bar |
| Overrides.qll:28:3:28:9 | MemberCall | Overrides.qll:6:7:6:9 | ClassPredicate bar |
| Overrides.qll:29:3:29:10 | MemberCall | Overrides.qll:8:13:8:15 | ClassPredicate baz |
| ParamModules.qll:5:28:5:41 | PredicateCall | ParamModules.qll:2:23:2:28 | ClasslessPredicate fooSig |
| ParamModules.qll:5:28:5:41 | PredicateCall | ParamModules.qll:8:13:8:17 | ClasslessPredicate myFoo |
| ParamModules.qll:10:26:10:49 | PredicateCall | ParamModules.qll:5:15:5:17 | ClasslessPredicate bar |
| ParamModules.qll:26:27:26:53 | PredicateCall | ParamModules.qll:17:13:17:21 | ClasslessPredicate getAnEven |
| ParamModules.qll:26:27:26:61 | MemberCall | ParamModules.qll:23:12:23:16 | ClassPredicate myFoo |
| ParamModules.qll:37:29:37:47 | PredicateCall | ParamModules.qll:33:7:33:14 | ClasslessPredicate getThing |
| ParamModules.qll:37:29:37:47 | PredicateCall | ParamModules.qll:51:7:51:14 | ClasslessPredicate getThing |
| ParamModules.qll:59:30:59:45 | PredicateCall | ParamModules.qll:37:7:37:14 | ClasslessPredicate getThing |
| ParamModules.qll:59:30:59:53 | MemberCall | ParamModules.qll:46:14:46:18 | ClassPredicate myFoo |
| ParamModules.qll:61:39:61:47 | MemberCall | ParamModules.qll:46:14:46:18 | ClassPredicate myFoo |
| packs/other/OtherThing.qll:5:3:5:8 | PredicateCall | packs/lib/LibThing/Foo.qll:1:11:1:13 | ClasslessPredicate foo |
| packs/other/OtherThing.qll:6:3:6:8 | PredicateCall | packs/src/SrcThing.qll:8:11:8:13 | ClasslessPredicate bar |
| packs/src/SrcThing.qll:4:3:4:8 | PredicateCall | packs/lib/LibThing/Foo.qll:1:11:1:13 | ClasslessPredicate foo |
| packs/src/SrcThing.qll:5:3:5:8 | PredicateCall | packs/src/SrcThing.qll:8:11:8:13 | ClasslessPredicate bar |
dependsOn
| packs/other/qlpack.yml:1:1:1:4 | ql-other-pack-thing | packs/src/qlpack.yml:1:1:1:4 | ql-testing-src-pack |
| packs/src/qlpack.yml:1:1:1:4 | ql-testing-src-pack | packs/lib/qlpack.yml:1:1:1:4 | ql-testing-lib-pack |
exprPredicate
| Foo.qll:24:22:24:31 | predicate | Foo.qll:22:3:22:32 | ClasslessPredicate myThing0 |
| Foo.qll:26:22:26:31 | predicate | Foo.qll:20:3:20:54 | ClasslessPredicate myThing2 |
| Foo.qll:47:55:47:62 | predicate | Foo.qll:42:20:42:27 | NewTypeBranch MkRoot |
| Foo.qll:47:65:47:70 | predicate | Foo.qll:44:9:44:56 | ClasslessPredicate edge |
| MultiResolve.qll:12:19:12:23 | predicate | MultiResolve.qll:1:1:4:1 | ClasslessPredicate foo |
| ParamModules.qll:4:18:4:25 | predicate | ParamModules.qll:2:13:2:36 | ClasslessPredicate fooSig |
| ParamModules.qll:10:34:10:40 | predicate | ParamModules.qll:8:3:8:35 | ClasslessPredicate myFoo |
| Foo.qll:24:22:24:31 | predicate | Foo.qll:22:13:22:20 | ClasslessPredicate myThing0 |
| Foo.qll:26:22:26:31 | predicate | Foo.qll:20:13:20:20 | ClasslessPredicate myThing2 |
| Foo.qll:47:55:47:62 | predicate | Foo.qll:42:20:42:25 | NewTypeBranch MkRoot |
| Foo.qll:47:65:47:70 | predicate | Foo.qll:44:19:44:22 | ClasslessPredicate edge |
| MultiResolve.qll:12:19:12:23 | predicate | MultiResolve.qll:1:11:1:13 | ClasslessPredicate foo |
| ParamModules.qll:4:18:4:25 | predicate | ParamModules.qll:2:23:2:28 | ClasslessPredicate fooSig |
| ParamModules.qll:10:34:10:40 | predicate | ParamModules.qll:8:13:8:17 | ClasslessPredicate myFoo |

View File

@@ -3,8 +3,8 @@ nodes
| Foo.qll:1:1:1:17 | Import | semmle.order | 1 |
| Foo.qll:1:1:27:2 | TopLevel | semmle.label | [TopLevel] TopLevel |
| Foo.qll:1:1:27:2 | TopLevel | semmle.order | 1 |
| Foo.qll:3:1:7:1 | Class Foo | semmle.label | [Class] Class Foo |
| Foo.qll:3:1:7:1 | Class Foo | semmle.order | 3 |
| Foo.qll:3:7:3:9 | Class Foo | semmle.label | [Class] Class Foo |
| Foo.qll:3:7:3:9 | Class Foo | semmle.order | 3 |
| Foo.qll:3:19:3:22 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
| Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 |
| Foo.qll:4:3:4:17 | CharPred Foo | semmle.label | [CharPred] CharPred Foo |
@@ -17,8 +17,8 @@ nodes
| Foo.qll:4:15:4:15 | Integer | semmle.order | 8 |
| Foo.qll:6:3:6:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
| Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 9 |
| Foo.qll:6:3:6:38 | ClassPredicate toString | semmle.label | [ClassPredicate] ClassPredicate toString |
| Foo.qll:6:3:6:38 | ClassPredicate toString | semmle.order | 9 |
| Foo.qll:6:10:6:17 | ClassPredicate toString | semmle.label | [ClassPredicate] ClassPredicate toString |
| Foo.qll:6:10:6:17 | ClassPredicate toString | semmle.order | 10 |
| Foo.qll:6:23:6:28 | result | semmle.label | [ResultAccess] result |
| Foo.qll:6:23:6:28 | result | semmle.order | 11 |
| Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
@@ -27,8 +27,8 @@ nodes
| Foo.qll:6:32:6:36 | String | semmle.order | 13 |
| Foo.qll:9:1:9:5 | annotation | semmle.label | [Annotation] annotation |
| Foo.qll:9:1:9:5 | annotation | semmle.order | 14 |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.label | [ClasslessPredicate] ClasslessPredicate foo |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.order | 15 |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | semmle.label | [ClasslessPredicate] ClasslessPredicate foo |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | semmle.order | 15 |
| Foo.qll:9:21:9:23 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
| Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 16 |
| Foo.qll:9:21:9:25 | f | semmle.label | [VarDecl] f |
@@ -59,8 +59,8 @@ nodes
| Foo.qll:10:69:10:73 | inner | semmle.order | 29 |
| Foo.qll:10:69:10:84 | MemberCall | semmle.label | [MemberCall] MemberCall |
| Foo.qll:10:69:10:84 | MemberCall | semmle.order | 29 |
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.label | [ClasslessPredicate] ClasslessPredicate calls |
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.order | 31 |
| Foo.qll:13:11:13:15 | ClasslessPredicate calls | semmle.label | [ClasslessPredicate] ClasslessPredicate calls |
| Foo.qll:13:11:13:15 | ClasslessPredicate calls | semmle.order | 31 |
| Foo.qll:13:17:13:19 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
| Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 32 |
| Foo.qll:13:17:13:21 | f | semmle.label | [VarDecl] f |
@@ -239,38 +239,38 @@ nodes
edges
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.label | getAnImport() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.order | 1 |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:3:1:7:1 | Class Foo | semmle.label | getAClass() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:3:1:7:1 | Class Foo | semmle.order | 3 |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.label | getAPredicate() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.order | 15 |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.label | getAPredicate() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.order | 31 |
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:3:19:3:22 | TypeExpr | semmle.label | getASuperType() |
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 |
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:4:3:4:17 | CharPred Foo | semmle.label | getCharPred() |
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:4:3:4:17 | CharPred Foo | semmle.order | 5 |
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:6:3:6:38 | ClassPredicate toString | semmle.label | getClassPredicate(_) |
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:6:3:6:38 | ClassPredicate toString | semmle.order | 9 |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:3:7:3:9 | Class Foo | semmle.label | getAClass() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:3:7:3:9 | Class Foo | semmle.order | 3 |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:9:17:9:19 | ClasslessPredicate foo | semmle.label | getAPredicate() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:9:17:9:19 | ClasslessPredicate foo | semmle.order | 15 |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:13:11:13:15 | ClasslessPredicate calls | semmle.label | getAPredicate() |
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:13:11:13:15 | ClasslessPredicate calls | semmle.order | 31 |
| Foo.qll:3:7:3:9 | Class Foo | Foo.qll:3:19:3:22 | TypeExpr | semmle.label | getASuperType() |
| Foo.qll:3:7:3:9 | Class Foo | Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 |
| Foo.qll:3:7:3:9 | Class Foo | Foo.qll:4:3:4:17 | CharPred Foo | semmle.label | getCharPred() |
| Foo.qll:3:7:3:9 | Class Foo | Foo.qll:4:3:4:17 | CharPred Foo | semmle.order | 5 |
| Foo.qll:3:7:3:9 | Class Foo | Foo.qll:6:10:6:17 | ClassPredicate toString | semmle.label | getClassPredicate(_) |
| Foo.qll:3:7:3:9 | Class Foo | Foo.qll:6:10:6:17 | ClassPredicate toString | semmle.order | 10 |
| Foo.qll:4:3:4:17 | CharPred Foo | Foo.qll:4:11:4:15 | ComparisonFormula | semmle.label | getBody() |
| Foo.qll:4:3:4:17 | CharPred Foo | Foo.qll:4:11:4:15 | ComparisonFormula | semmle.order | 6 |
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:11:4:11 | Integer | semmle.label | getLeftOperand() |
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:11:4:11 | Integer | semmle.order | 6 |
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.label | getRightOperand() |
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.order | 8 |
| Foo.qll:6:3:6:38 | ClassPredicate toString | Foo.qll:6:3:6:8 | TypeExpr | semmle.label | getReturnTypeExpr() |
| Foo.qll:6:3:6:38 | ClassPredicate toString | Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 9 |
| Foo.qll:6:3:6:38 | ClassPredicate toString | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | getBody() |
| Foo.qll:6:3:6:38 | ClassPredicate toString | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 11 |
| Foo.qll:6:10:6:17 | ClassPredicate toString | Foo.qll:6:3:6:8 | TypeExpr | semmle.label | getReturnTypeExpr() |
| Foo.qll:6:10:6:17 | ClassPredicate toString | Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 9 |
| Foo.qll:6:10:6:17 | ClassPredicate toString | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | getBody() |
| Foo.qll:6:10:6:17 | ClassPredicate toString | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 11 |
| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | result | semmle.label | getLeftOperand() |
| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | result | semmle.order | 11 |
| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:32:6:36 | String | semmle.label | getRightOperand() |
| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:32:6:36 | String | semmle.order | 13 |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | Foo.qll:9:1:9:5 | annotation | semmle.label | getAnAnnotation() |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | Foo.qll:9:1:9:5 | annotation | semmle.order | 14 |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | Foo.qll:9:21:9:25 | f | semmle.label | getParameter(_) |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | Foo.qll:9:21:9:25 | f | semmle.order | 16 |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | getBody() |
| Foo.qll:9:7:11:1 | ClasslessPredicate foo | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 18 |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | Foo.qll:9:1:9:5 | annotation | semmle.label | getAnAnnotation() |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | Foo.qll:9:1:9:5 | annotation | semmle.order | 14 |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | Foo.qll:9:21:9:25 | f | semmle.label | getParameter(_) |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | Foo.qll:9:21:9:25 | f | semmle.order | 16 |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | getBody() |
| Foo.qll:9:17:9:19 | ClasslessPredicate foo | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 18 |
| Foo.qll:9:21:9:25 | f | Foo.qll:9:21:9:23 | TypeExpr | semmle.label | getTypeExpr() |
| Foo.qll:9:21:9:25 | f | Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 16 |
| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | f | semmle.label | getLeftOperand() |
@@ -297,10 +297,10 @@ edges
| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.order | 27 |
| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | inner | semmle.label | getBase() |
| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | inner | semmle.order | 29 |
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.label | getParameter(_) |
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.order | 32 |
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:14:3:26:14 | Disjunction | semmle.label | getBody() |
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:14:3:26:14 | Disjunction | semmle.order | 34 |
| Foo.qll:13:11:13:15 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.label | getParameter(_) |
| Foo.qll:13:11:13:15 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.order | 32 |
| Foo.qll:13:11:13:15 | ClasslessPredicate calls | Foo.qll:14:3:26:14 | Disjunction | semmle.label | getBody() |
| Foo.qll:13:11:13:15 | ClasslessPredicate calls | Foo.qll:14:3:26:14 | Disjunction | semmle.order | 34 |
| Foo.qll:13:17:13:21 | f | Foo.qll:13:17:13:19 | TypeExpr | semmle.label | getTypeExpr() |
| Foo.qll:13:17:13:21 | f | Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 32 |
| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | f | semmle.label | getArgument(_) |

View File

@@ -1,3 +1,3 @@
| Test.qll:2:1:2:27 | ClasslessPredicate isXML | Acronyms in isXML should be PascalCase/camelCase |
| Test.qll:8:1:10:15 | NewType TXMLElements | Acronyms in TXMLElements should be PascalCase/camelCase |
| Test.qll:10:3:10:15 | NewTypeBranch TXMLElement | Acronyms in TXMLElement should be PascalCase/camelCase |
| Test.qll:2:11:2:15 | ClasslessPredicate isXML | Acronyms in isXML should be PascalCase/camelCase |
| Test.qll:8:9:8:20 | NewType TXMLElements | Acronyms in TXMLElements should be PascalCase/camelCase |
| Test.qll:10:3:10:13 | NewTypeBranch TXMLElement | Acronyms in TXMLElement should be PascalCase/camelCase |

View File

@@ -1,2 +1,2 @@
| Foo.qll:2:11:2:38 | ClasslessPredicate dead1 | Code is dead |
| Foo.qll:6:3:6:30 | ClasslessPredicate dead2 | Code is dead |
| Foo.qll:2:21:2:25 | ClasslessPredicate dead1 | Code is dead |
| Foo.qll:6:13:6:17 | ClasslessPredicate dead2 | Code is dead |

View File

@@ -1 +1 @@
| Test.qll:12:3:12:33 | ClassPredicate test | Wrong.test overrides $@ but does not have an override annotation. | Test.qll:4:3:4:40 | ClassPredicate test | Super.test |
| Test.qll:12:13:12:16 | ClassPredicate test | Wrong.test overrides $@ but does not have an override annotation. | Test.qll:4:13:4:16 | ClassPredicate test | Super.test |

View File

@@ -1,6 +1,6 @@
| Test.qll:1:1:3:3 | QLDoc | This QLDoc comment contains the common misspelling 'mispelled', which should instead be 'misspelled'. |
| Test.qll:4:1:11:1 | Class PublicallyAccessible | This class name contains the common misspelling 'publically', which should instead be 'publicly'. |
| Test.qll:4:7:4:26 | Class PublicallyAccessible | This class name contains the common misspelling 'publically', which should instead be 'publicly'. |
| Test.qll:5:3:5:20 | FieldDecl | This field name contains the common misspelling 'occurences', which should instead be 'occurrences'. |
| Test.qll:10:3:10:36 | ClassPredicate hasAgrument | This classPredicate name contains the common misspelling 'agrument', which should instead be 'argument'. |
| Test.qll:10:13:10:23 | ClassPredicate hasAgrument | This classPredicate name contains the common misspelling 'agrument', which should instead be 'argument'. |
| Test.qll:13:1:16:3 | QLDoc | This QLDoc comment contains the non-US spelling 'colour', which should instead be 'color'. |
| Test.qll:17:1:22:1 | Class AnalysedInt | This class name contains the non-US spelling 'analysed', which should instead be 'analyzed'. |
| Test.qll:17:7:17:17 | Class AnalysedInt | This class name contains the non-US spelling 'analysed', which should instead be 'analyzed'. |

View File

@@ -1,6 +1,6 @@
| Test.qll:4:15:4:18 | this | Test.qll:3:1:5:1 | Strings |
| Test.qll:4:15:4:18 | this | Test.qll:3:1:5:1 | Strings.Strings |
| Test.qll:4:15:4:18 | this | Test.qll:3:1:5:1 | Strings.extends |
| Test.qll:4:15:4:18 | this | Test.qll:3:7:3:13 | Strings |
| Test.qll:4:15:4:18 | this | Test.qll:3:7:3:13 | Strings.Strings |
| Test.qll:4:15:4:18 | this | Test.qll:3:7:3:13 | Strings.extends |
| Test.qll:4:22:4:76 | Set | file://:0:0:0:0 | string |
| Test.qll:4:23:4:24 | String | file://:0:0:0:0 | string |
| Test.qll:4:27:4:29 | String | file://:0:0:0:0 | string |
@@ -12,9 +12,9 @@
| Test.qll:4:61:4:63 | String | file://:0:0:0:0 | string |
| Test.qll:4:66:4:69 | String | file://:0:0:0:0 | string |
| Test.qll:4:72:4:75 | String | file://:0:0:0:0 | string |
| Test.qll:8:14:8:17 | this | Test.qll:7:1:9:1 | Floats |
| Test.qll:8:14:8:17 | this | Test.qll:7:1:9:1 | Floats.Floats |
| Test.qll:8:14:8:17 | this | Test.qll:7:1:9:1 | Floats.extends |
| Test.qll:8:14:8:17 | this | Test.qll:7:7:7:12 | Floats |
| Test.qll:8:14:8:17 | this | Test.qll:7:7:7:12 | Floats.Floats |
| Test.qll:8:14:8:17 | this | Test.qll:7:7:7:12 | Floats.extends |
| Test.qll:8:21:8:70 | Set | file://:0:0:0:0 | float |
| Test.qll:8:22:8:24 | Float | file://:0:0:0:0 | float |
| Test.qll:8:27:8:29 | Float | file://:0:0:0:0 | float |
@@ -27,28 +27,28 @@
| Test.qll:8:62:8:64 | Float | file://:0:0:0:0 | float |
| Test.qll:8:67:8:69 | Float | file://:0:0:0:0 | float |
| Test.qll:11:37:11:42 | result | file://:0:0:0:0 | string |
| Test.qll:11:46:11:46 | a | Test.qll:3:1:5:1 | Strings |
| Test.qll:11:46:11:46 | a | Test.qll:3:7:3:13 | Strings |
| Test.qll:11:46:11:50 | AddExpr | file://:0:0:0:0 | string |
| Test.qll:11:50:11:50 | b | Test.qll:3:1:5:1 | Strings |
| Test.qll:11:50:11:50 | b | Test.qll:3:7:3:13 | Strings |
| Test.qll:13:36:13:41 | result | file://:0:0:0:0 | float |
| Test.qll:13:45:13:45 | a | Test.qll:7:1:9:1 | Floats |
| Test.qll:13:45:13:45 | a | Test.qll:7:7:7:12 | Floats |
| Test.qll:13:45:13:49 | AddExpr | file://:0:0:0:0 | float |
| Test.qll:13:49:13:49 | b | Test.qll:7:1:9:1 | Floats |
| Test.qll:16:12:16:15 | this | Test.qll:15:1:19:1 | Base |
| Test.qll:16:12:16:15 | this | Test.qll:15:1:19:1 | Base.Base |
| Test.qll:16:12:16:15 | this | Test.qll:15:1:19:1 | Base.extends |
| Test.qll:13:49:13:49 | b | Test.qll:7:7:7:12 | Floats |
| Test.qll:16:12:16:15 | this | Test.qll:15:7:15:10 | Base |
| Test.qll:16:12:16:15 | this | Test.qll:15:7:15:10 | Base.Base |
| Test.qll:16:12:16:15 | this | Test.qll:15:7:15:10 | Base.extends |
| Test.qll:16:19:16:23 | String | file://:0:0:0:0 | string |
| Test.qll:18:15:18:20 | result | file://:0:0:0:0 | int |
| Test.qll:18:24:18:24 | Integer | file://:0:0:0:0 | int |
| Test.qll:22:11:22:14 | this | Test.qll:21:1:27:1 | Sub |
| Test.qll:22:11:22:14 | this | Test.qll:21:1:27:1 | Sub.Sub |
| Test.qll:22:11:22:14 | this | Test.qll:21:1:27:1 | Sub.extends |
| Test.qll:22:11:22:14 | this | Test.qll:21:7:21:9 | Sub |
| Test.qll:22:11:22:14 | this | Test.qll:21:7:21:9 | Sub.Sub |
| Test.qll:22:11:22:14 | this | Test.qll:21:7:21:9 | Sub.extends |
| Test.qll:22:18:22:22 | String | file://:0:0:0:0 | string |
| Test.qll:24:15:24:20 | result | file://:0:0:0:0 | int |
| Test.qll:24:24:24:33 | Super | Test.qll:15:1:19:1 | Base |
| Test.qll:24:24:24:33 | Super | Test.qll:15:7:15:10 | Base |
| Test.qll:24:24:24:39 | MemberCall | file://:0:0:0:0 | int |
| Test.qll:26:16:26:21 | result | file://:0:0:0:0 | int |
| Test.qll:26:25:26:29 | Super | Test.qll:15:1:19:1 | Base |
| Test.qll:26:25:26:29 | Super | Test.qll:15:7:15:10 | Base |
| Test.qll:26:25:26:35 | MemberCall | file://:0:0:0:0 | int |
| Test.qll:30:32:30:37 | result | file://:0:0:0:0 | int |
| Test.qll:30:41:30:41 | a | file://:0:0:0:0 | int |