mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Autoformat.
This commit is contained in:
@@ -17,9 +17,8 @@ private string commonTopLevelDomainRegex() { result = "com|org|edu|gov|uk|net|io
|
||||
|
||||
predicate looksLikeUrl(StrConst s) {
|
||||
exists(string text | text = s.getText() |
|
||||
text
|
||||
.regexpMatch("(?i)([a-z]*:?//)?\\.?([a-z0-9-]+\\.)+(" + commonTopLevelDomainRegex() +
|
||||
")(:[0-9]+)?/?")
|
||||
text.regexpMatch("(?i)([a-z]*:?//)?\\.?([a-z0-9-]+\\.)+(" + commonTopLevelDomainRegex() +
|
||||
")(:[0-9]+)?/?")
|
||||
or
|
||||
// target is a HTTP URL to a domain on any TLD
|
||||
text.regexpMatch("(?i)https?://([a-z0-9-]+\\.)+([a-z]+)(:[0-9]+)?/?")
|
||||
|
||||
@@ -184,8 +184,7 @@ predicate ssa_consistency(string clsname, string problem, string what) {
|
||||
/* Minimality of phi nodes */
|
||||
exists(SsaVariable var |
|
||||
strictcount(var.getAPhiInput()) = 1 and
|
||||
var
|
||||
.getAPhiInput()
|
||||
var.getAPhiInput()
|
||||
.getDefinition()
|
||||
.getBasicBlock()
|
||||
.strictlyDominates(var.getDefinition().getBasicBlock())
|
||||
|
||||
@@ -607,8 +607,7 @@ class TaintTrackingImplementation extends string {
|
||||
TaintTrackingNode src, DataFlow::Node node, TaintTrackingContext context, AttributePath path,
|
||||
TaintKind kind, string edgeLabel
|
||||
) {
|
||||
this
|
||||
.(EssaTaintTracking)
|
||||
this.(EssaTaintTracking)
|
||||
.taintedDefinition(src, node.asVariable().getDefinition(), context, path, kind) and
|
||||
edgeLabel = ""
|
||||
}
|
||||
|
||||
@@ -95,8 +95,7 @@ private predicate dont_modify(File f) {
|
||||
private predicate auto_generated(File f) {
|
||||
exists(Comment c |
|
||||
c.getLocation().getFile() = f and
|
||||
c
|
||||
.getText()
|
||||
c.getText()
|
||||
.regexpMatch("(?is)# *this +(code|file) +is +(auto(matically)?[ -]?generated|created automatically).*")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -84,8 +84,7 @@ class Value extends TObject {
|
||||
predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
this
|
||||
.(ObjectInternal)
|
||||
this.(ObjectInternal)
|
||||
.getOrigin()
|
||||
.getLocation()
|
||||
.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
|
||||
@@ -75,8 +75,7 @@ class Object extends @py_object {
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
this.hasOrigin() and
|
||||
this
|
||||
.getOrigin()
|
||||
this.getOrigin()
|
||||
.getLocation()
|
||||
.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user