yaml_lint_core/
lib.rs

1//! # yaml-lint-core
2//!
3//! Core YAML linting engine providing the fundamental types and traits
4//! for building YAML linters.
5
6pub mod config;
7pub mod linter;
8pub mod output;
9pub mod problem;
10pub mod rules;
11
12// Re-export main types for convenience
13pub use config::Config;
14pub use linter::Linter;
15pub use problem::{LintLevel, LintProblem};
16pub use rules::{Rule, RuleRegistry};
17
18/// Result type for lint operations
19pub type Result<T> = std::result::Result<T, LintError>;
20
21/// Errors that can occur during linting
22#[derive(thiserror::Error, Debug)]
23pub enum LintError {
24    #[error("Failed to parse YAML: {0}")]
25    ParseError(String),
26
27    #[error("Failed to read file: {0}")]
28    IoError(#[from] std::io::Error),
29
30    #[error("Invalid configuration: {0}")]
31    ConfigError(String),
32
33    #[error("Unknown rule: {0}")]
34    UnknownRule(String),
35}