quickmark_core/
lib.rs

1//! # QuickMark Linter Core
2//!
3//! ## Single-Use Architecture Contract
4//!
5//! **IMPORTANT**: All linter components in this crate follow a strict single-use contract:
6//!
7//! - **Context**: One context instance per document analysis
8//! - **MultiRuleLinter**: One linter instance per document analysis  
9//! - **RuleLinter**: Individual rule linters are used once and discarded
10//!
11//! This design eliminates state management complexity.
12//!
13//! ### Usage Pattern
14//! ```rust,no_run
15//! use quickmark_core::linter::MultiRuleLinter;
16//! use quickmark_core::config::QuickmarkConfig;
17//! use std::path::PathBuf;
18//!
19//! // Example usage (variables would be provided by your application)
20//! # let path = PathBuf::new();
21//! # let config: QuickmarkConfig = unimplemented!();
22//! # let source = "";
23//!
24//! // Correct: Fresh instances for each document
25//! let mut linter = MultiRuleLinter::new_for_document(path, config, source);
26//! let violations = linter.analyze();
27//! // linter is now invalid - create new one for next document
28//! ```
29
30pub mod config;
31pub mod linter;
32pub mod rules;
33pub mod tree_sitter_walker;
34
35#[cfg(any(test, feature = "testing"))]
36pub mod test_utils;