diff --git a/Makefile b/Makefile index 98626ec..437c003 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ clean: ## Remove build artifacts test: ## Run tests with warnings treated as errors RUSTFLAGS="-D warnings" $(CARGO) test --all-targets --all-features $(BUILD_JOBS) + # --all-targets skips doctests, so run them explicitly to keep CI + # aligned with the plain `cargo test` used by cargo-mutants. + RUSTFLAGS="-D warnings" $(CARGO) test --doc --all-features $(BUILD_JOBS) test-workflow-contracts: ## Validate the mutation-testing caller contract uv run --with 'pytest>=8' --with 'pyyaml>=6' pytest tests/workflow_contracts -q diff --git a/src/heuristics/mod.rs b/src/heuristics/mod.rs index 93ff2ee..b5a4da5 100644 --- a/src/heuristics/mod.rs +++ b/src/heuristics/mod.rs @@ -3,7 +3,7 @@ pub mod ambiguity; pub mod complexity; pub mod depth; -pub(crate) mod text; +pub mod text; pub use ambiguity::{AmbiguityHeuristic, AmbiguityHeuristicError}; pub use complexity::{HeuristicComplexity, HeuristicComplexityError}; diff --git a/src/heuristics/text.rs b/src/heuristics/text.rs index f4aa2af..0903954 100644 --- a/src/heuristics/text.rs +++ b/src/heuristics/text.rs @@ -40,6 +40,7 @@ pub fn normalize_tokens(input: &str) -> Vec { /// let count = weighted_count(tokens.iter().map(String::as_str), &["and"], 2); /// assert_eq!(count, 2); /// ``` +#[must_use] pub fn weighted_count>( tokens: impl Iterator, patterns: &[&str],