use std::path::PathBuf;
use miette::Diagnostic;
use thiserror::Error;
#[derive(Debug, Error, Diagnostic)]
#[non_exhaustive]
pub enum Error {
#[error("cannot read ignore '{file}': {err}")]
Read {
file: PathBuf,
#[source]
err: std::io::Error,
},
#[error("cannot parse glob from ignore '{file:?}': {err}")]
Glob {
file: Option<PathBuf>,
#[source]
err: ignore::Error,
},
#[error("multiple: {0:?}")]
Multi(#[related] Vec<Error>),
#[error("cannot canonicalize '{path:?}'")]
Canonicalize {
path: PathBuf,
#[source]
err: std::io::Error,
},
}