mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JS: Overlay annotations for some failing tests
Locally these seem to get rid of the compilation warnings, but of course CI is the true arbiter here.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import javascript
|
import javascript
|
||||||
import semmle.javascript.dataflow.FlowSummary
|
import semmle.javascript.dataflow.FlowSummary
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class MkSummary extends SummarizedCallable {
|
class MkSummary extends SummarizedCallable {
|
||||||
private CallExpr mkSummary;
|
private CallExpr mkSummary;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import javascript
|
import javascript
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class TestAmdModuleRange extends AmdModuleDefinition::Range {
|
class TestAmdModuleRange extends AmdModuleDefinition::Range {
|
||||||
TestAmdModuleRange() { this.getCallee().(PropAccess).getQualifiedName() = "test.amd.range" }
|
TestAmdModuleRange() { this.getCallee().(PropAccess).getQualifiedName() = "test.amd.range" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import semmle.javascript.dataflow.internal.FlowSteps as FlowSteps
|
|||||||
import semmle.javascript.dataflow.internal.AbstractPropertiesImpl as AbstractPropertiesImpl
|
import semmle.javascript.dataflow.internal.AbstractPropertiesImpl as AbstractPropertiesImpl
|
||||||
import semmle.javascript.dataflow.CustomAbstractValueDefinitions
|
import semmle.javascript.dataflow.CustomAbstractValueDefinitions
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class MyCustomAbstractValueDefinition extends CustomAbstractValueDefinition {
|
class MyCustomAbstractValueDefinition extends CustomAbstractValueDefinition {
|
||||||
DataFlow::ValueNode node;
|
DataFlow::ValueNode node;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import javascript
|
|||||||
import semmle.javascript.dataflow.InferredTypes
|
import semmle.javascript.dataflow.InferredTypes
|
||||||
import semmle.javascript.dataflow.CustomAbstractValueDefinitions
|
import semmle.javascript.dataflow.CustomAbstractValueDefinitions
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class MyCustomAbstractValueDefinition extends CustomAbstractValueDefinition, AST::ValueNode {
|
class MyCustomAbstractValueDefinition extends CustomAbstractValueDefinition, AST::ValueNode {
|
||||||
MyCustomAbstractValueDefinition() {
|
MyCustomAbstractValueDefinition() {
|
||||||
this.flow() instanceof DataFlow::ObjectLiteralNode and
|
this.flow() instanceof DataFlow::ObjectLiteralNode and
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ private import semmle.javascript.dataflow.InferredTypes
|
|||||||
/**
|
/**
|
||||||
* A custom abstract value representing the DOM object `document`.
|
* A custom abstract value representing the DOM object `document`.
|
||||||
*/
|
*/
|
||||||
|
overlay[local]
|
||||||
class Document extends CustomAbstractValueTag {
|
class Document extends CustomAbstractValueTag {
|
||||||
Document() { this = "document" }
|
Document() { this = "document" }
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ class Document extends CustomAbstractValueTag {
|
|||||||
* Note that `getType()` isn't quite right, since `typeof document.all === 'undefined'`,
|
* Note that `getType()` isn't quite right, since `typeof document.all === 'undefined'`,
|
||||||
* but that's fine for the purposes of this test.
|
* but that's fine for the purposes of this test.
|
||||||
*/
|
*/
|
||||||
|
overlay[local]
|
||||||
class DocumentAll extends CustomAbstractValueTag {
|
class DocumentAll extends CustomAbstractValueTag {
|
||||||
DocumentAll() { this = "document.all" }
|
DocumentAll() { this = "document.all" }
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import javascript
|
import javascript
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class CustomImport extends DataFlow::ModuleImportNode::Range, DataFlow::CallNode {
|
class CustomImport extends DataFlow::ModuleImportNode::Range, DataFlow::CallNode {
|
||||||
CustomImport() { this.getCalleeName() = "customImport" }
|
CustomImport() { this.getCalleeName() = "customImport" }
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import javascript
|
import javascript
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class BadSourceNode extends DataFlow::SourceNode {
|
class BadSourceNode extends DataFlow::SourceNode {
|
||||||
BadSourceNode() { this.(DataFlow::PropRead).getPropertyName() = "foo" }
|
BadSourceNode() { this.(DataFlow::PropRead).getPropertyName() = "foo" }
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import javascript
|
|||||||
deprecated import utils.test.ConsistencyChecking
|
deprecated import utils.test.ConsistencyChecking
|
||||||
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
|
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class TypeModelFromCodeQL extends ModelInput::TypeModel {
|
class TypeModelFromCodeQL extends ModelInput::TypeModel {
|
||||||
override predicate isTypeUsed(string type) { type = "danger-constant" }
|
override predicate isTypeUsed(string type) { type = "danger-constant" }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import javascript
|
import javascript
|
||||||
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
|
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
|
||||||
|
|
||||||
|
overlay[local]
|
||||||
class IsTesting extends ApiGraphModels::TestAllModels {
|
class IsTesting extends ApiGraphModels::TestAllModels {
|
||||||
IsTesting() { this = this }
|
IsTesting() { this = this }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user