Skip to content

Commit 85d742d

Browse files
committed
Remove dead_code override that was used to improve dev ergonomics during initial ddsa development.
1 parent 1b5daf8 commit 85d742d

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

crates/static-analysis-kernel/src/analysis/ddsa_lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
// This product includes software developed at Datadog (https://www.datadoghq.com/).
33
// Copyright 2024 Datadog, Inc.
44

5-
#[allow(dead_code)]
65
pub mod bridge;
76
pub mod common;
87
pub mod context;
98
pub use context::*;
109
pub mod extension;
1110
pub(crate) mod js;
1211
pub(crate) mod ops;
13-
#[allow(dead_code)]
1412
pub(crate) mod runtime;
1513
pub(crate) use runtime::JsRuntime;
1614
#[allow(dead_code)]

crates/static-analysis-kernel/src/analysis/ddsa_lib/bridge/ts_node.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ mod tests {
202202
fn parse(&mut self, text: &'static str) -> Tree {
203203
Tree(Arc::new(self.0.parse(text, None).unwrap()), text)
204204
}
205-
fn language(&self) -> tree_sitter::Language {
206-
self.0.language().unwrap()
207-
}
208205
}
209206

210207
/// Compares whether a [`TreeSitterNodeObj`] has equivalent data to a [`tree_sitter::Node`].

crates/static-analysis-kernel/src/analysis/ddsa_lib/bridge/violation.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ mod tests {
7070
/// Tests the statefulness of the bridge, and that it can be cleared between executions.
7171
#[test]
7272
fn violations_bridge_drains() {
73-
let mut runtime = cfg_test_runtime();
73+
let (mut runtime, mut v_bridge) = setup_bridge("VIOLATIONS");
7474
let scope = &mut runtime.handle_scope();
75-
let mut v_bridge = ViolationBridge::new(scope);
7675
let v8_v_bridge = v_bridge.as_local(scope);
77-
attach_as_global(scope, v8_v_bridge, "VIOLATIONS");
7876
assert_eq!(v8_v_bridge.length(), 0);
7977

8078
let violations = v_bridge.drain_collect(scope).unwrap();
@@ -98,11 +96,9 @@ VIOLATIONS.push(v);
9896
/// Tests that the bridge is cleared when `drain_collect` is called, even if there were deserialization errors.
9997
#[test]
10098
fn violations_bridge_invalid_obj() {
101-
let mut runtime = cfg_test_runtime();
99+
let (mut runtime, mut v_bridge) = setup_bridge("VIOLATIONS");
102100
let scope = &mut runtime.handle_scope();
103-
let mut v_bridge = ViolationBridge::new(scope);
104101
let v8_v_bridge = v_bridge.as_local(scope);
105-
attach_as_global(scope, v8_v_bridge, "VIOLATIONS");
106102
assert_eq!(v8_v_bridge.length(), 0);
107103

108104
let code = r#"

crates/static-analysis-kernel/src/analysis/ddsa_lib/runtime.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pub struct JsRuntime {
5353
ts_query_cursor: Rc<RefCell<tree_sitter::QueryCursor>>,
5454
// v8-specific
5555
/// A [`v8::Object`] that has been set as the prototype of the `JsRuntime`'s default context's global object.
56+
#[allow(dead_code)]
5657
v8_ddsa_global: v8::Global<v8::Object>,
5758
}
5859

0 commit comments

Comments
 (0)