hemmer_provider_generator_analyzer/
lib.rs1mod analyzer;
22mod client_detector;
23mod confidence;
24mod config_detector;
25mod crate_pattern_detector;
26mod error_detector;
27pub mod git_cloner;
28mod output;
29mod workspace_detector;
30
31pub use analyzer::{
32 AnalysisResult, AnalysisWarning, AnalyzedConfigAttr, AnalyzedMetadata, SdkAnalyzer,
33};
34pub use confidence::ConfidenceReport;
35pub use git_cloner::ClonedRepo;
36
37use thiserror::Error;
38
39#[derive(Debug, Error)]
41pub enum AnalyzerError {
42 #[error("Failed to read SDK directory: {0}")]
43 DirectoryRead(#[from] std::io::Error),
44
45 #[error("Failed to parse Cargo metadata: {0}")]
46 CargoMetadata(String),
47
48 #[error("Failed to parse Rust source: {0}")]
49 SynParse(String),
50
51 #[error("No SDK crates found in workspace")]
52 NoSdkCrates,
53
54 #[error("Failed to detect pattern: {0}")]
55 PatternDetection(String),
56
57 #[error("Failed to generate YAML: {0}")]
58 YamlGeneration(#[from] serde_yaml::Error),
59
60 #[error("Failed to format output: {0}")]
61 FormatError(#[from] std::fmt::Error),
62
63 #[error("Analysis error: {0}")]
64 Other(#[from] anyhow::Error),
65}
66
67pub type Result<T> = std::result::Result<T, AnalyzerError>;