use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum AnalysisError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("no grammar available for any detected language in the repository")]
NoGrammarsAvailable,
#[error("configuration error: {0}")]
Config(#[from] sdivi_config::ConfigError),
#[error("snapshot write error: {0}")]
SnapshotIo(std::io::Error),
#[error("invalid node id {id:?}: {reason}")]
InvalidNodeId {
id: String,
reason: String,
},
#[error("invalid configuration: {message}")]
InvalidConfig {
message: String,
},
}