mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Delete some misleading qhelp and rename a couple of queries.
This commit is contained in:
@@ -68,4 +68,4 @@ where not ie.refersTo(_) and
|
||||
guard.controls(ie.getAFlowNode().getBasicBlock(), true)
|
||||
)
|
||||
|
||||
select ie, "Unable to resolve import of '" + ie.getImportedModuleName() + "'."
|
||||
select ie, "Unable to resolve import of '" + ie.getImportedModuleName() + "'."
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<overview>
|
||||
<p>Points-to analysis underpins type inference and thus most of Semmle's Python analysis.
|
||||
Failures in points-to undermines type inference and reduces the coverage and also accuracy of many queries.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
</qhelp>
|
||||
@@ -1,9 +1,10 @@
|
||||
/**
|
||||
* @name Key "points-to" fails for expression.
|
||||
* @name Key points-to fails for expression.
|
||||
* @description Expression does not "point-to" an object which prevents further points-to analysis.
|
||||
* @kind problem
|
||||
* @problem.severity info
|
||||
* @id py/key-points-to-failure
|
||||
* @deprecated
|
||||
*/
|
||||
|
||||
import python
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<overview>
|
||||
<p>Points-to analysis underpins type inference and thus most of Semmle's Python analysis.
|
||||
Failures in points-to undermines type inference and reduces the coverage and also accuracy of many queries.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
</qhelp>
|
||||
@@ -1,10 +1,11 @@
|
||||
/**
|
||||
* @name "points-to" fails for expression.
|
||||
* @name points-to fails for expression.
|
||||
* @description Expression does not "point-to" an object which prevents type inference.
|
||||
* @kind problem
|
||||
* @id py/points-to-failure
|
||||
* @problem.severity info
|
||||
* @tags reliability
|
||||
* @tags debug
|
||||
* @deprecated
|
||||
*/
|
||||
|
||||
import python
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
<qhelp>
|
||||
<overview>
|
||||
<p>In order to analyse uses of a class, all its attributes need to be known. Without the full inheritance hierarchy this is impossible.
|
||||
This is an informational query only.
|
||||
This query finds classes where type inference fails and gives some indication as to why that failure occurred.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This is an informational query only, this query depends on points-to and type inference.
|
||||
Unlike normal queries it does not indicate any problem with the program being analyzed.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/**
|
||||
* @name Inheritance hierarchy cannot be inferred for class
|
||||
* @description Inability to infer inheritance hierarchy cannot be inferred for class will impair analysis
|
||||
* @description Inability to infer the inheritance hierarchy for a class will impair analysis.
|
||||
* @id py/failed-inheritance-inference
|
||||
* @kind problem
|
||||
* @problem.severity info
|
||||
* @tags debug
|
||||
*/
|
||||
|
||||
|
||||
import python
|
||||
|
||||
|
||||
from Class cls
|
||||
where not exists(ClassObject c | c.getPyClass() = cls)
|
||||
or
|
||||
exists(ClassObject c | c.getPyClass() = cls | c.failedInference())
|
||||
select cls, "Inference of class hierarchy failed for class."
|
||||
from Class cls, string reason
|
||||
where
|
||||
exists(ClassObject c | c.getPyClass() = cls | c.failedInference(reason))
|
||||
select cls, "Inference of class hierarchy failed for class '" + cls.getName() + "': " + reason + "."
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<overview>
|
||||
<p>
|
||||
Type inference is the key part of Semmle's Python analysis.
|
||||
Failures in type inference and reduces the coverage and also accuracy of many queries.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
</qhelp>
|
||||
@@ -4,11 +4,12 @@
|
||||
* @kind problem
|
||||
* @problem.severity info
|
||||
* @id py/type-inference-failure
|
||||
* @deprecated
|
||||
*/
|
||||
import python
|
||||
|
||||
|
||||
from ControlFlowNode f, Object o
|
||||
from ControlFlowNode f, Object o
|
||||
where f.refersTo(o) and
|
||||
not exists(ClassObject c | f.refersTo(o, c, _))
|
||||
select o, "Type inference fails for 'object'."
|
||||
Reference in New Issue
Block a user