From a8fe6ed2f89a5ec185f652ba168e7bdc17faf785 Mon Sep 17 00:00:00 2001 From: pandaadir05 Date: Fri, 21 Nov 2025 13:53:30 +0200 Subject: [PATCH] Fix CI/CD validation errors - Add allow dead_code to unused helper function - Remove redundant PID assertion in macOS test - All clippy checks pass with -D warnings - All tests passing (33/33) --- ghost-core/src/yara_engine.rs | 1 + ghost-core/tests/macos_process_test.rs | 1 - ghost-tui/src/app.rs | 9 ++++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ghost-core/src/yara_engine.rs b/ghost-core/src/yara_engine.rs index 755c9b0..fda7534 100644 --- a/ghost-core/src/yara_engine.rs +++ b/ghost-core/src/yara_engine.rs @@ -436,6 +436,7 @@ impl DynamicYaraEngine { /// Read memory from a specific process and region (Linux implementation) #[cfg(target_os = "linux")] + #[allow(dead_code)] fn read_process_memory(pid: u32, region: &MemoryRegion) -> Result, GhostError> { use std::fs::File; use std::io::{Read, Seek, SeekFrom}; diff --git a/ghost-core/tests/macos_process_test.rs b/ghost-core/tests/macos_process_test.rs index 088abba..802b613 100644 --- a/ghost-core/tests/macos_process_test.rs +++ b/ghost-core/tests/macos_process_test.rs @@ -47,7 +47,6 @@ fn test_process_info_structure() { let processes = process::enumerate_processes().expect("Failed to enumerate processes"); for proc in processes.iter().take(10) { - assert!(proc.pid > 0 || proc.pid == 0); assert!(proc.thread_count >= 1); if proc.pid > 0 { diff --git a/ghost-tui/src/app.rs b/ghost-tui/src/app.rs index 54b8a0f..0861e1f 100644 --- a/ghost-tui/src/app.rs +++ b/ghost-tui/src/app.rs @@ -402,6 +402,13 @@ impl App { } pub fn get_tab_titles(&self) -> Vec<&str> { - vec!["Overview", "Processes", "Detections", "Threat Intel", "Memory", "Logs"] + vec![ + "Overview", + "Processes", + "Detections", + "Threat Intel", + "Memory", + "Logs", + ] } }