mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: Make implicit this receivers explicit
This commit is contained in:
@@ -55,16 +55,16 @@ deprecated class CustomPathNode extends TCustomPathNode {
|
|||||||
predicate hasLocationInfo(
|
predicate hasLocationInfo(
|
||||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||||
) {
|
) {
|
||||||
asNode1().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
this.asNode1().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||||
or
|
or
|
||||||
asNode2().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
this.asNode2().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets a textual representation of this element. */
|
/** Gets a textual representation of this element. */
|
||||||
string toString() {
|
string toString() {
|
||||||
result = asNode1().toString()
|
result = this.asNode1().toString()
|
||||||
or
|
or
|
||||||
result = asNode2().toString()
|
result = this.asNode2().toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ class ExternalApiUsedWithUntrustedData extends MkExternalApi {
|
|||||||
|
|
||||||
/** Gets the number of untrusted sources used with this external API. */
|
/** Gets the number of untrusted sources used with this external API. */
|
||||||
int getNumberOfUntrustedSources() {
|
int getNumberOfUntrustedSources() {
|
||||||
result = count(getUntrustedDataNode().getAnUntrustedSource())
|
result = count(this.getUntrustedDataNode().getAnUntrustedSource())
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets a textual representation of this element. */
|
/** Gets a textual representation of this element. */
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ class UninitializedConfig extends TaintTracking::Configuration {
|
|||||||
override predicate isBarrier(DataFlow::Node node, TaintKind kind) {
|
override predicate isBarrier(DataFlow::Node node, TaintKind kind) {
|
||||||
kind instanceof Uninitialized and
|
kind instanceof Uninitialized and
|
||||||
(
|
(
|
||||||
definition(node.asVariable())
|
this.definition(node.asVariable())
|
||||||
or
|
or
|
||||||
use(node.asVariable())
|
this.use(node.asVariable())
|
||||||
or
|
or
|
||||||
sanitizingNode(node.asCfgNode())
|
this.sanitizingNode(node.asCfgNode())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ module LdapBind {
|
|||||||
abstract predicate useSsl();
|
abstract predicate useSsl();
|
||||||
|
|
||||||
/** DEPRECATED: Alias for useSsl */
|
/** DEPRECATED: Alias for useSsl */
|
||||||
deprecated predicate useSSL() { useSsl() }
|
deprecated predicate useSSL() { this.useSsl() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ class LdapBind extends DataFlow::Node instanceof LdapBind::Range {
|
|||||||
predicate useSsl() { super.useSsl() }
|
predicate useSsl() { super.useSsl() }
|
||||||
|
|
||||||
/** DEPRECATED: Alias for useSsl */
|
/** DEPRECATED: Alias for useSsl */
|
||||||
deprecated predicate useSSL() { useSsl() }
|
deprecated predicate useSSL() { this.useSsl() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** DEPRECATED: Alias for LdapBind */
|
/** DEPRECATED: Alias for LdapBind */
|
||||||
|
|||||||
4
python/ql/src/external/DefectFilter.qll
vendored
4
python/ql/src/external/DefectFilter.qll
vendored
@@ -65,8 +65,8 @@ class DefectResult extends int {
|
|||||||
/** Gets the URL corresponding to the location of this query result. */
|
/** Gets the URL corresponding to the location of this query result. */
|
||||||
string getURL() {
|
string getURL() {
|
||||||
result =
|
result =
|
||||||
"file://" + getFile().getAbsolutePath() + ":" + getStartLine() + ":" + getStartColumn() + ":" +
|
"file://" + this.getFile().getAbsolutePath() + ":" + this.getStartLine() + ":" +
|
||||||
getEndLine() + ":" + getEndColumn()
|
this.getStartColumn() + ":" + this.getEndLine() + ":" + this.getEndColumn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user