pub enum CodemodError {
PatternInference(String),
Parse(String),
Scan(String),
Transform(String),
Rule(String),
Matching(String),
Io(Error),
Yaml(Error),
Json(Error),
UnsupportedLanguage(String),
Validation(String),
Other(String),
}Expand description
Unified error type for all codemod-core operations.
Variants§
PatternInference(String)
Pattern inference failed — the engine could not derive a transformation pattern from the provided before/after examples.
Parse(String)
AST parsing failed — tree-sitter could not produce a valid syntax tree for the given source code.
Scan(String)
Scanning error — something went wrong while walking the filesystem or matching patterns across files.
Transform(String)
Transformation error — the engine failed to apply a pattern transformation to a source file.
Rule(String)
Rule error — a codemod rule file could not be loaded, parsed, or failed validation.
Matching(String)
Pattern matching error.
Io(Error)
File I/O error — a filesystem operation (read, write, create directory, etc.) failed.
Yaml(Error)
YAML serialization/deserialization error.
Json(Error)
JSON serialization/deserialization error.
UnsupportedLanguage(String)
Language not supported.
Validation(String)
Validation failed.
Other(String)
Catch-all for other errors.
Trait Implementations§
Source§impl Debug for CodemodError
impl Debug for CodemodError
Source§impl Display for CodemodError
impl Display for CodemodError
Source§impl Error for CodemodError
impl Error for CodemodError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for CodemodError
impl From<Error> for CodemodError
Source§impl From<Error> for CodemodError
impl From<Error> for CodemodError
Auto Trait Implementations§
impl Freeze for CodemodError
impl !RefUnwindSafe for CodemodError
impl Send for CodemodError
impl Sync for CodemodError
impl Unpin for CodemodError
impl UnsafeUnpin for CodemodError
impl !UnwindSafe for CodemodError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more