Merge pull request #9744 from github/aeisenberg/move-contextual-queries

This commit is contained in:
Andrew Eisenberg
2022-06-29 11:44:33 -07:00
committed by GitHub
42 changed files with 39 additions and 12 deletions

View File

@@ -14,10 +14,13 @@ class Definition extends TLocalDefinition {
/** Gets a textual representation of this element. */
string toString() { result = "Definition " + this.getAstNode().getLocation().toString() }
/** Gets the AST Node associated with this element */
AstNode getAstNode() { this = TLocalDefinition(result) }
/** Gets the Module associated with this element */
Module getModule() { result = this.getAstNode().getScope().getEnclosingModule() }
/** Gets the source location of the AST Node associated with this element */
Location getLocation() { result = this.getAstNode().getLocation() }
}

View File

@@ -5,7 +5,7 @@
*/
import python
import DefinitionTracking
import analysis.DefinitionTracking
predicate uniqueness_error(int number, string what, string problem) {
what in [

View File

@@ -6,7 +6,7 @@
*/
import python
import DefinitionTracking
import analysis.DefinitionTracking
from NiceLocationExpr use, Definition defn, string kind
where defn = definitionOf(use, kind)

View File

@@ -8,7 +8,7 @@
*/
import python
import DefinitionTracking
import analysis.DefinitionTracking
external string selectedSourceFile();

View File

@@ -8,7 +8,7 @@
*/
import python
import DefinitionTracking
import analysis.DefinitionTracking
external string selectedSourceFile();

View File

@@ -3,7 +3,7 @@
*/
import python
import DefinitionTracking
import analysis.DefinitionTracking
predicate want_to_have_definition(Expr e) {
/* not builtin object like len, tuple, etc. */

View File

@@ -0,0 +1,4 @@
---
category: breaking
---
* Contextual queries and the query libraries they depend on have been moved to the `codeql/python-all` package.