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:
Taus
2025-10-10 15:10:17 +00:00
committed by Asger F
parent c09563f775
commit 889209719b
9 changed files with 10 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import javascript
import semmle.javascript.dataflow.FlowSummary
overlay[local]
class MkSummary extends SummarizedCallable {
private CallExpr mkSummary;

View File

@@ -1,5 +1,6 @@
import javascript
overlay[local]
class TestAmdModuleRange extends AmdModuleDefinition::Range {
TestAmdModuleRange() { this.getCallee().(PropAccess).getQualifiedName() = "test.amd.range" }
}

View File

@@ -4,6 +4,7 @@ import semmle.javascript.dataflow.internal.FlowSteps as FlowSteps
import semmle.javascript.dataflow.internal.AbstractPropertiesImpl as AbstractPropertiesImpl
import semmle.javascript.dataflow.CustomAbstractValueDefinitions
overlay[local]
class MyCustomAbstractValueDefinition extends CustomAbstractValueDefinition {
DataFlow::ValueNode node;

View File

@@ -2,6 +2,7 @@ import javascript
import semmle.javascript.dataflow.InferredTypes
import semmle.javascript.dataflow.CustomAbstractValueDefinitions
overlay[local]
class MyCustomAbstractValueDefinition extends CustomAbstractValueDefinition, AST::ValueNode {
MyCustomAbstractValueDefinition() {
this.flow() instanceof DataFlow::ObjectLiteralNode and

View File

@@ -4,6 +4,7 @@ private import semmle.javascript.dataflow.InferredTypes
/**
* A custom abstract value representing the DOM object `document`.
*/
overlay[local]
class Document extends CustomAbstractValueTag {
Document() { this = "document" }
@@ -25,6 +26,7 @@ class Document extends CustomAbstractValueTag {
* Note that `getType()` isn't quite right, since `typeof document.all === 'undefined'`,
* but that's fine for the purposes of this test.
*/
overlay[local]
class DocumentAll extends CustomAbstractValueTag {
DocumentAll() { this = "document.all" }

View File

@@ -1,5 +1,6 @@
import javascript
overlay[local]
class CustomImport extends DataFlow::ModuleImportNode::Range, DataFlow::CallNode {
CustomImport() { this.getCalleeName() = "customImport" }

View File

@@ -7,6 +7,7 @@
import javascript
overlay[local]
class BadSourceNode extends DataFlow::SourceNode {
BadSourceNode() { this.(DataFlow::PropRead).getPropertyName() = "foo" }

View File

@@ -2,6 +2,7 @@ import javascript
deprecated import utils.test.ConsistencyChecking
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
overlay[local]
class TypeModelFromCodeQL extends ModelInput::TypeModel {
override predicate isTypeUsed(string type) { type = "danger-constant" }

View File

@@ -1,6 +1,7 @@
import javascript
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
overlay[local]
class IsTesting extends ApiGraphModels::TestAllModels {
IsTesting() { this = this }
}