Expand description
§codemod-core
Core engine for codemod-pilot: pattern inference, matching, and transformation.
This crate provides the fundamental building blocks for:
- Inferring code transformation patterns from before/after examples
- Scanning codebases for pattern matches
- Applying transformations with preview and rollback support
- Managing reusable codemod rules
§Architecture
pattern: Pattern inference, matching, and validationtransform: Transformation application, conflict detection, and rollbackscanner: Codebase scanning with parallel file processingrule: Codemod rule management and serializationlanguage: Language adapter trait for tree-sitter integrationerror: Error types and result aliases
Re-exports§
pub use error::CodemodError;pub use error::Result;pub use language::LanguageAdapter;pub use pattern::validator::PatternValidator;pub use pattern::validator::ValidationResult;pub use pattern::Pattern;pub use pattern::PatternInferrer;pub use pattern::PatternMatcher;pub use pattern::PatternVar;pub use rule::builtin::BuiltinRules;pub use rule::schema::RulePattern;pub use rule::CodemodRule;pub use rule::RuleConfig;pub use scanner::ScanConfig;pub use scanner::ScanMatch;pub use scanner::ScanResult;pub use scanner::Scanner;pub use transform::conflict::ConflictResolver;pub use transform::rollback::RollbackEntry;pub use transform::rollback::RollbackManager;pub use transform::TransformApplier;pub use transform::TransformResult;
Modules§
- error
- Error types for the codemod-core crate.
- language
- Language adapter trait for tree-sitter integration.
- pattern
- Pattern inference, matching, and validation.
- rule
- Codemod rule management — loading, saving, and validation.
- scanner
- Codebase scanning for pattern matches.
- transform
- Transformation application, conflict detection, and rollback.