Skip to content

Commit fbbff87

Browse files
JoshuaJewellclaudehyperpolymath
authored
fix: compilation errors, deprecation warnings, and add unit tests (#17)
- Fix WeakPoint struct initializations missing `file` and `line` fields across src/kanren/core.rs, src/a2ml/mod.rs, and all test files - Migrate report/gui.rs from deprecated egui API (TopBottomPanel, SidePanel, CentralPanel::show, ScrollArea::id_source) to current Panel::top/left/show_inside and id_salt - Fix version mismatch: main.rs command version now matches Cargo.toml (2.1.0) - Fix stale repository URL in Cargo.toml (panic-attacker → panic-attack) - Add `log` crate and replace raw println!/eprintln! with structured logging in groove.rs, kanren/rules.rs, assail/analyzer.rs, notify.rs, ambush/mod.rs - Remove useless usize >= 0 comparisons in property_tests.rs - Add 11 unit tests for assail/analyzer.rs covering language detection, unsafe code detection, panic path thresholds, command injection, eval detection, empty directory handling, and excluded directory skipping - Add 13 unit tests for panll/mod.rs covering axis/category labels, export format, image/temporal diff serialization, and write_export I/O All 381 tests pass with zero warnings. https://claude.ai/code/session_01AMMKMRH8GhvCnNjrV6iWLn Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
1 parent 8134738 commit fbbff87

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/a2ml/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,8 @@ mod tests {
827827
weak_points: vec![WeakPoint {
828828
category: WeakPointCategory::UncheckedError,
829829
location: Some("src/main.rs:10".to_string()),
830-
file: Some("src/main.rs".to_string()),
831-
line: Some(10),
830+
file: None,
831+
line: None,
832832
severity: Severity::Medium,
833833
description: "unchecked result".to_string(),
834834
recommended_attack: vec![AttackAxis::Concurrency],

tests/sarif_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ fn make_test_report() -> AssailReport {
1818
severity: Severity::Critical,
1919
description: "unsafe block found".to_string(),
2020
location: Some("src/main.rs:10".to_string()),
21-
file: Some("src/main.rs".to_string()),
22-
line: Some(10),
21+
file: None,
22+
line: None,
2323
recommended_attack: vec![AttackAxis::Memory],
2424
},
2525
WeakPoint {
2626
category: WeakPointCategory::PanicPath,
2727
severity: Severity::Medium,
2828
description: "unwrap on Option".to_string(),
2929
location: Some("src/lib.rs:42".to_string()),
30-
file: Some("src/lib.rs".to_string()),
31-
line: Some(42),
30+
file: None,
31+
line: None,
3232
recommended_attack: vec![],
3333
},
3434
],

0 commit comments

Comments
 (0)