use std::io;
#[derive(thiserror::Error, Debug)]
pub enum CodewalkError {
#[error(
"I/O error: {0}. Fix: verify the path exists, is readable, and that the current process has permission to walk it."
)]
Io(#[from] io::Error),
#[error(
"file too large: {0} bytes. Fix: raise `max_file_size` or exclude the file before walking the tree."
)]
FileTooLarge(u64),
#[error(
"walk builder error: {0}. Fix: verify ignore rules, symlink handling, and walk configuration values."
)]
Ignore(#[from] ignore::Error),
#[error(
"UTF-8 decoding error: {0}. Fix: call `content()` for raw bytes or skip non-UTF-8 files before decoding them as text."
)]
Utf8Error(#[from] std::string::FromUtf8Error),
}
pub type Result<T> = std::result::Result<T, CodewalkError>;