Context
PR #109 introduces configurable exclusions for the no_std_fs_operations lint via dylint.toml configuration. Crates listed in excluded_crates should skip diagnostics during lint execution.
Testing Gap
Unit tests comprehensively cover:
- Configuration parsing and deserialisation
- Exclusion matching logic (
is_excluded)
- Configuration loading with error handling
However, no behavioural/integration tests verify that excluded crates actually skip diagnostics during lint execution. The current dylint_testing UI harness determines the crate name internally and cannot be controlled, preventing end-to-end validation of exclusion behaviour.
Proposed Solution
Create workspace fixture infrastructure to enable integration testing:
-
Fixture workspace structure: Create test fixtures under tests/fixtures/ with controlled workspace layouts, including:
- A fixture crate that uses
std::fs operations
- A
dylint.toml configuration with exclusions
- Cargo.toml configurations for multiple test scenarios
-
Integration test harness: Implement tests using std::process::Command to:
- Build and run the lint against fixture projects
- Parse compiler output to count diagnostics
- Assert that excluded crates produce zero diagnostics
- Assert that non-excluded crates produce expected diagnostics
-
Test coverage: Validate both behaviours:
- Crate in
excluded_crates → no diagnostics
- Crate not in
excluded_crates → diagnostics emitted
References
Notes
This infrastructure will benefit future lint development by enabling end-to-end testing of configuration-driven behaviour across the Whitaker lint suite.
Context
PR #109 introduces configurable exclusions for the
no_std_fs_operationslint viadylint.tomlconfiguration. Crates listed inexcluded_cratesshould skip diagnostics during lint execution.Testing Gap
Unit tests comprehensively cover:
is_excluded)However, no behavioural/integration tests verify that excluded crates actually skip diagnostics during lint execution. The current
dylint_testingUI harness determines the crate name internally and cannot be controlled, preventing end-to-end validation of exclusion behaviour.Proposed Solution
Create workspace fixture infrastructure to enable integration testing:
Fixture workspace structure: Create test fixtures under
tests/fixtures/with controlled workspace layouts, including:std::fsoperationsdylint.tomlconfiguration with exclusionsIntegration test harness: Implement tests using
std::process::Commandto:Test coverage: Validate both behaviours:
excluded_crates→ no diagnosticsexcluded_crates→ diagnostics emittedReferences
Notes
This infrastructure will benefit future lint development by enabling end-to-end testing of configuration-driven behaviour across the Whitaker lint suite.