Skip to content

Commit 255e8bd

Browse files
committed
fix: complete test/bench/example lint allows for Windows CI (#2)
Add comprehensive #![allow] blocks to all integration test, benchmark, and example files in collector-core and daemoneye-eventbus. Fixes Windows CI failure where dead_code and other lints were not suppressed in test code after workspace lint inheritance was enabled. Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
1 parent 0fd8edb commit 255e8bd

32 files changed

Lines changed: 1104 additions & 872 deletions

collector-core/tests/chaos_testing.rs

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,57 @@
1-
//! Chaos testing for EventSource failure scenarios and recovery behavior.
2-
//!
3-
//! This test suite simulates various failure conditions and validates that
4-
//! the collector-core framework handles them gracefully, maintains system
5-
//! stability, and recovers appropriately.
6-
71
#![allow(
82
clippy::unwrap_used,
93
clippy::expect_used,
104
clippy::panic,
11-
clippy::str_to_string,
12-
clippy::uninlined_format_args,
13-
clippy::use_debug,
145
clippy::print_stdout,
15-
clippy::clone_on_ref_ptr,
16-
clippy::indexing_slicing,
6+
clippy::use_debug,
7+
clippy::dbg_macro,
178
clippy::shadow_unrelated,
189
clippy::shadow_reuse,
19-
clippy::let_underscore_must_use,
20-
clippy::items_after_statements,
21-
clippy::wildcard_enum_match_arm,
22-
clippy::non_ascii_literal,
2310
clippy::arithmetic_side_effects,
2411
clippy::as_conversions,
12+
clippy::cast_possible_truncation,
13+
clippy::cast_sign_loss,
14+
clippy::cast_precision_loss,
15+
clippy::cast_possible_wrap,
2516
clippy::cast_lossless,
26-
clippy::float_cmp,
27-
clippy::doc_markdown,
17+
clippy::pattern_type_mismatch,
18+
clippy::non_ascii_literal,
19+
clippy::str_to_string,
20+
clippy::uninlined_format_args,
21+
clippy::let_underscore_must_use,
22+
clippy::must_use_candidate,
2823
clippy::missing_const_for_fn,
29-
clippy::unreadable_literal,
30-
clippy::unseparated_literal_suffix,
31-
clippy::semicolon_outside_block,
24+
clippy::used_underscore_binding,
3225
clippy::redundant_clone,
33-
clippy::pattern_type_mismatch,
34-
clippy::ignore_without_reason,
35-
clippy::redundant_else,
3626
clippy::explicit_iter_loop,
37-
clippy::match_same_arms,
38-
clippy::significant_drop_tightening,
27+
clippy::integer_division,
28+
clippy::modulo_arithmetic,
29+
clippy::unseparated_literal_suffix,
30+
clippy::doc_markdown,
31+
clippy::clone_on_ref_ptr,
32+
clippy::indexing_slicing,
33+
clippy::items_after_statements,
34+
clippy::wildcard_enum_match_arm,
35+
clippy::float_cmp,
36+
clippy::unreadable_literal,
37+
clippy::semicolon_outside_block,
38+
clippy::semicolon_inside_block,
3939
clippy::redundant_closure_for_method_calls,
4040
clippy::equatable_if_let,
4141
clippy::manual_string_new,
4242
clippy::case_sensitive_file_extension_comparisons,
43-
clippy::cast_possible_wrap,
44-
clippy::modulo_arithmetic,
45-
clippy::integer_division,
46-
clippy::redundant_type_annotations
43+
clippy::redundant_type_annotations,
44+
clippy::significant_drop_tightening,
45+
clippy::redundant_else,
46+
clippy::match_same_arms,
47+
clippy::ignore_without_reason,
48+
dead_code
4749
)]
50+
//! Chaos testing for EventSource failure scenarios and recovery behavior.
51+
//!
52+
//! This test suite simulates various failure conditions and validates that
53+
//! the collector-core framework handles them gracefully, maintains system
54+
//! stability, and recovers appropriately.
4855
4956
use async_trait::async_trait;
5057
use collector_core::{

collector-core/tests/collector_daemoneye_integration.rs

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,53 @@
1-
//! Integration tests for Collector with DaemoneyeEventBus.
2-
31
#![allow(
42
clippy::unwrap_used,
53
clippy::expect_used,
64
clippy::panic,
7-
clippy::str_to_string,
8-
clippy::uninlined_format_args,
9-
clippy::use_debug,
105
clippy::print_stdout,
11-
clippy::clone_on_ref_ptr,
12-
clippy::indexing_slicing,
6+
clippy::use_debug,
7+
clippy::dbg_macro,
138
clippy::shadow_unrelated,
149
clippy::shadow_reuse,
15-
clippy::let_underscore_must_use,
16-
clippy::items_after_statements,
17-
clippy::wildcard_enum_match_arm,
18-
clippy::non_ascii_literal,
1910
clippy::arithmetic_side_effects,
2011
clippy::as_conversions,
12+
clippy::cast_possible_truncation,
13+
clippy::cast_sign_loss,
14+
clippy::cast_precision_loss,
15+
clippy::cast_possible_wrap,
2116
clippy::cast_lossless,
22-
clippy::float_cmp,
23-
clippy::doc_markdown,
17+
clippy::pattern_type_mismatch,
18+
clippy::non_ascii_literal,
19+
clippy::str_to_string,
20+
clippy::uninlined_format_args,
21+
clippy::let_underscore_must_use,
22+
clippy::must_use_candidate,
2423
clippy::missing_const_for_fn,
25-
clippy::unreadable_literal,
26-
clippy::unseparated_literal_suffix,
27-
clippy::semicolon_outside_block,
24+
clippy::used_underscore_binding,
2825
clippy::redundant_clone,
29-
clippy::pattern_type_mismatch,
30-
clippy::ignore_without_reason,
31-
clippy::redundant_else,
3226
clippy::explicit_iter_loop,
33-
clippy::match_same_arms,
34-
clippy::significant_drop_tightening,
27+
clippy::integer_division,
28+
clippy::modulo_arithmetic,
29+
clippy::unseparated_literal_suffix,
30+
clippy::doc_markdown,
31+
clippy::clone_on_ref_ptr,
32+
clippy::indexing_slicing,
33+
clippy::items_after_statements,
34+
clippy::wildcard_enum_match_arm,
35+
clippy::float_cmp,
36+
clippy::unreadable_literal,
37+
clippy::semicolon_outside_block,
38+
clippy::semicolon_inside_block,
3539
clippy::redundant_closure_for_method_calls,
3640
clippy::equatable_if_let,
3741
clippy::manual_string_new,
3842
clippy::case_sensitive_file_extension_comparisons,
39-
clippy::cast_possible_wrap,
40-
clippy::modulo_arithmetic,
41-
clippy::integer_division,
42-
clippy::redundant_type_annotations
43+
clippy::redundant_type_annotations,
44+
clippy::significant_drop_tightening,
45+
clippy::redundant_else,
46+
clippy::match_same_arms,
47+
clippy::ignore_without_reason,
48+
dead_code
4349
)]
50+
//! Integration tests for Collector with DaemoneyeEventBus.
4451
4552
use collector_core::event_bus::EventBus;
4653
use collector_core::{Collector, CollectorConfig, DaemoneyeEventBus, event_bus::EventBusConfig};

collector-core/tests/compatibility_integration_test.rs

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,61 @@
1-
//! Compatibility tests ensuring collector-core works with existing procmond and daemoneye-agent.
2-
//!
3-
//! This test suite verifies that the collector-core framework maintains backward
4-
//! compatibility with existing components and preserves the established IPC protocol
5-
//! and operational behavior.
6-
71
#![allow(
82
clippy::unwrap_used,
93
clippy::expect_used,
104
clippy::panic,
11-
clippy::str_to_string,
12-
clippy::uninlined_format_args,
13-
clippy::use_debug,
145
clippy::print_stdout,
15-
clippy::clone_on_ref_ptr,
16-
clippy::indexing_slicing,
6+
clippy::use_debug,
7+
clippy::dbg_macro,
178
clippy::shadow_unrelated,
189
clippy::shadow_reuse,
19-
clippy::let_underscore_must_use,
20-
clippy::items_after_statements,
21-
clippy::wildcard_enum_match_arm,
22-
clippy::non_ascii_literal,
2310
clippy::arithmetic_side_effects,
2411
clippy::as_conversions,
12+
clippy::cast_possible_truncation,
13+
clippy::cast_sign_loss,
14+
clippy::cast_precision_loss,
15+
clippy::cast_possible_wrap,
2516
clippy::cast_lossless,
26-
clippy::float_cmp,
27-
clippy::doc_markdown,
17+
clippy::pattern_type_mismatch,
18+
clippy::non_ascii_literal,
19+
clippy::str_to_string,
20+
clippy::uninlined_format_args,
21+
clippy::let_underscore_must_use,
22+
clippy::must_use_candidate,
2823
clippy::missing_const_for_fn,
29-
clippy::unreadable_literal,
30-
clippy::unseparated_literal_suffix,
31-
clippy::semicolon_outside_block,
24+
clippy::used_underscore_binding,
3225
clippy::redundant_clone,
33-
clippy::pattern_type_mismatch,
34-
clippy::ignore_without_reason,
35-
clippy::redundant_else,
3626
clippy::explicit_iter_loop,
37-
clippy::match_same_arms,
38-
clippy::significant_drop_tightening,
27+
clippy::integer_division,
28+
clippy::modulo_arithmetic,
29+
clippy::unseparated_literal_suffix,
30+
clippy::doc_markdown,
31+
clippy::clone_on_ref_ptr,
32+
clippy::indexing_slicing,
33+
clippy::items_after_statements,
34+
clippy::wildcard_enum_match_arm,
35+
clippy::float_cmp,
36+
clippy::unreadable_literal,
37+
clippy::semicolon_outside_block,
38+
clippy::semicolon_inside_block,
3939
clippy::redundant_closure_for_method_calls,
4040
clippy::equatable_if_let,
4141
clippy::manual_string_new,
4242
clippy::case_sensitive_file_extension_comparisons,
43-
clippy::cast_possible_wrap,
44-
clippy::modulo_arithmetic,
45-
clippy::integer_division,
4643
clippy::redundant_type_annotations,
44+
clippy::significant_drop_tightening,
45+
clippy::redundant_else,
46+
clippy::match_same_arms,
47+
clippy::ignore_without_reason,
48+
dead_code,
49+
clippy::manual_assert,
4750
clippy::unused_self,
48-
clippy::unused_async
51+
clippy::unused_async,
52+
clippy::single_match_else
4953
)]
54+
//! Compatibility tests ensuring collector-core works with existing procmond and daemoneye-agent.
55+
//!
56+
//! This test suite verifies that the collector-core framework maintains backward
57+
//! compatibility with existing components and preserves the established IPC protocol
58+
//! and operational behavior.
5059
5160
use async_trait::async_trait;
5261
use collector_core::{
@@ -217,7 +226,14 @@ struct MockDaemonEyeAgentClient {
217226
tasks_sent: Arc<AtomicUsize>,
218227
results_received: Arc<AtomicUsize>,
219228
capabilities_received: Arc<AtomicUsize>,
220-
#[allow(dead_code)]
229+
#[allow(
230+
dead_code,
231+
clippy::if_then_some_else_none,
232+
clippy::unused_self,
233+
clippy::unused_async,
234+
clippy::single_match_else,
235+
clippy::manual_assert
236+
)]
221237
running: Arc<AtomicBool>,
222238
}
223239

collector-core/tests/comprehensive_test_suite.rs

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,62 @@
1-
//! Comprehensive test suite for collector-core framework completion.
2-
//!
3-
//! This test suite ensures all requirements from task 4.5 are met:
4-
//! - Integration tests for multiple concurrent EventSource registration and lifecycle management
5-
//! - Criterion benchmarks for event batching, backpressure handling, and graceful shutdown coordination
6-
//! - Property-based tests for CollectionEvent serialization and capability negotiation
7-
//! - Chaos testing for EventSource failure scenarios and recovery behavior
8-
//! - Performance benchmarks for collector-core runtime overhead and event throughput
9-
//! - Security tests for EventSource isolation and capability enforcement
10-
//! - Compatibility tests ensuring collector-core works with existing procmond and daemoneye-agent
11-
121
#![allow(
132
clippy::unwrap_used,
143
clippy::expect_used,
154
clippy::panic,
16-
clippy::str_to_string,
17-
clippy::uninlined_format_args,
18-
clippy::use_debug,
195
clippy::print_stdout,
20-
clippy::clone_on_ref_ptr,
21-
clippy::indexing_slicing,
6+
clippy::use_debug,
7+
clippy::dbg_macro,
228
clippy::shadow_unrelated,
239
clippy::shadow_reuse,
24-
clippy::let_underscore_must_use,
25-
clippy::items_after_statements,
26-
clippy::wildcard_enum_match_arm,
27-
clippy::non_ascii_literal,
2810
clippy::arithmetic_side_effects,
2911
clippy::as_conversions,
12+
clippy::cast_possible_truncation,
13+
clippy::cast_sign_loss,
14+
clippy::cast_precision_loss,
15+
clippy::cast_possible_wrap,
3016
clippy::cast_lossless,
31-
clippy::float_cmp,
32-
clippy::doc_markdown,
17+
clippy::pattern_type_mismatch,
18+
clippy::non_ascii_literal,
19+
clippy::str_to_string,
20+
clippy::uninlined_format_args,
21+
clippy::let_underscore_must_use,
22+
clippy::must_use_candidate,
3323
clippy::missing_const_for_fn,
34-
clippy::unreadable_literal,
35-
clippy::unseparated_literal_suffix,
36-
clippy::semicolon_outside_block,
24+
clippy::used_underscore_binding,
3725
clippy::redundant_clone,
38-
clippy::pattern_type_mismatch,
39-
clippy::ignore_without_reason,
40-
clippy::redundant_else,
4126
clippy::explicit_iter_loop,
42-
clippy::match_same_arms,
43-
clippy::significant_drop_tightening,
27+
clippy::integer_division,
28+
clippy::modulo_arithmetic,
29+
clippy::unseparated_literal_suffix,
30+
clippy::doc_markdown,
31+
clippy::clone_on_ref_ptr,
32+
clippy::indexing_slicing,
33+
clippy::items_after_statements,
34+
clippy::wildcard_enum_match_arm,
35+
clippy::float_cmp,
36+
clippy::unreadable_literal,
37+
clippy::semicolon_outside_block,
38+
clippy::semicolon_inside_block,
4439
clippy::redundant_closure_for_method_calls,
4540
clippy::equatable_if_let,
4641
clippy::manual_string_new,
4742
clippy::case_sensitive_file_extension_comparisons,
48-
clippy::cast_possible_wrap,
49-
clippy::modulo_arithmetic,
50-
clippy::integer_division,
51-
clippy::redundant_type_annotations
43+
clippy::redundant_type_annotations,
44+
clippy::significant_drop_tightening,
45+
clippy::redundant_else,
46+
clippy::match_same_arms,
47+
clippy::ignore_without_reason,
48+
dead_code
5249
)]
50+
//! Comprehensive test suite for collector-core framework completion.
51+
//!
52+
//! This test suite ensures all requirements from task 4.5 are met:
53+
//! - Integration tests for multiple concurrent EventSource registration and lifecycle management
54+
//! - Criterion benchmarks for event batching, backpressure handling, and graceful shutdown coordination
55+
//! - Property-based tests for CollectionEvent serialization and capability negotiation
56+
//! - Chaos testing for EventSource failure scenarios and recovery behavior
57+
//! - Performance benchmarks for collector-core runtime overhead and event throughput
58+
//! - Security tests for EventSource isolation and capability enforcement
59+
//! - Compatibility tests ensuring collector-core works with existing procmond and daemoneye-agent
5360
5461
use async_trait::async_trait;
5562
use collector_core::{

0 commit comments

Comments
 (0)