mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: CG trace: Autoformat
This commit is contained in:
@@ -1,32 +1,27 @@
|
||||
import python
|
||||
|
||||
abstract class XMLBytecodeExpr extends XMLElement {
|
||||
}
|
||||
abstract class XMLBytecodeExpr extends XMLElement { }
|
||||
|
||||
class XMLBytecodeVariableName extends XMLBytecodeExpr {
|
||||
XMLBytecodeVariableName() { this.hasName("BytecodeVariableName") }
|
||||
XMLBytecodeVariableName() { this.hasName("BytecodeVariableName") }
|
||||
|
||||
string get_name_data() { result = this.getAChild("name").getTextValue() }
|
||||
string get_name_data() { result = this.getAChild("name").getTextValue() }
|
||||
}
|
||||
|
||||
class XMLBytecodeAttribute extends XMLBytecodeExpr {
|
||||
XMLBytecodeAttribute() { this.hasName("BytecodeAttribute") }
|
||||
XMLBytecodeAttribute() { this.hasName("BytecodeAttribute") }
|
||||
|
||||
string get_attr_name_data() { result = this.getAChild("attr_name").getTextValue() }
|
||||
string get_attr_name_data() { result = this.getAChild("attr_name").getTextValue() }
|
||||
|
||||
XMLBytecodeExpr get_object_data() {
|
||||
result.getParent() = this.getAChild("object")
|
||||
}
|
||||
XMLBytecodeExpr get_object_data() { result.getParent() = this.getAChild("object") }
|
||||
}
|
||||
|
||||
class XMLBytecodeCall extends XMLBytecodeExpr {
|
||||
XMLBytecodeCall() { this.hasName("BytecodeCall") }
|
||||
XMLBytecodeCall() { this.hasName("BytecodeCall") }
|
||||
|
||||
XMLBytecodeExpr get_function_data() {
|
||||
result.getParent() = this.getAChild("function")
|
||||
}
|
||||
XMLBytecodeExpr get_function_data() { result.getParent() = this.getAChild("function") }
|
||||
}
|
||||
|
||||
class XMLBytecodeUnknown extends XMLBytecodeExpr {
|
||||
XMLBytecodeUnknown() { this.hasName("BytecodeUnknown") }
|
||||
XMLBytecodeUnknown() { this.hasName("BytecodeUnknown") }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import RecordedCalls
|
||||
|
||||
|
||||
from string text, float number, float ratio, int i
|
||||
where
|
||||
exists(int all_rcs | all_rcs = count(XMLRecordedCall rc) and ratio = number / all_rcs |
|
||||
|
||||
@@ -2,4 +2,5 @@ import RecordedCalls
|
||||
|
||||
from UnidentifiedRecordedCall rc, XMLCall xml_call
|
||||
select "Could not uniquely identify this recorded call (either call or callee was not uniquely identified)",
|
||||
rc, rc.getXMLCall().get_filename_data(), rc.getXMLCall().get_linenum_data(), rc.getXMLCall().get_inst_index_data()
|
||||
rc, rc.getXMLCall().get_filename_data(), rc.getXMLCall().get_linenum_data(),
|
||||
rc.getXMLCall().get_inst_index_data()
|
||||
|
||||
Reference in New Issue
Block a user