Expand description
§reformat-core
Core library for code transformation and reformatting.
Provides case format conversion, whitespace cleaning, emoji transformation, file renaming, and file grouping with broken reference detection.
§Quick Start
use reformat_core::{WhitespaceCleaner, WhitespaceOptions};
let options = WhitespaceOptions::default();
let cleaner = WhitespaceCleaner::new(options);
let (files, lines) = cleaner.process(std::path::Path::new("src")).unwrap();
println!("Cleaned {} lines in {} files", lines, files);Re-exports§
pub use case::CaseFormat;pub use changes::Change;pub use changes::ChangeRecord;pub use combined::CombinedOptions;pub use combined::CombinedProcessor;pub use combined::CombinedStats;pub use config::Preset;pub use config::ReformatConfig;pub use converter::CaseConverter;pub use emoji::EmojiOptions;pub use emoji::EmojiTransformer;pub use endings::EndingsNormalizer;pub use endings::EndingsOptions;pub use endings::LineEnding;pub use group::FileGrouper;pub use group::GroupOptions;pub use group::GroupResult;pub use group::GroupStats;pub use header::HeaderManager;pub use header::HeaderOptions;pub use indent::IndentNormalizer;pub use indent::IndentOptions;pub use indent::IndentStyle;pub use refs::ApplyResult;pub use refs::FixRecord;pub use refs::ReferenceFix;pub use refs::ReferenceFixer;pub use refs::ReferenceScanner;pub use refs::ScanOptions;pub use rename::CaseTransform;pub use rename::FileRenamer;pub use rename::RenameOptions;pub use rename::SpaceReplace;pub use rename::TimestampFormat;pub use replace::ContentReplacer;pub use replace::ReplaceOptions;pub use replace::ReplacePattern;pub use replace::ReplacePatternConfig;pub use whitespace::WhitespaceCleaner;pub use whitespace::WhitespaceOptions;
Modules§
- case
- Case format definitions and conversion logic
- changes
- Change tracking for refactoring operations
- combined
- Combined processing for multiple transformations in a single pass
- config
- Configuration file support for reformat presets
- converter
- Case converter implementation for file processing
- emoji
- Emoji removal and replacement transformer
- endings
- Line ending normalization transformer
- group
- File grouping transformer - organizes files by common prefix into subdirectories
- header
- File header management transformer
- indent
- Indentation normalization transformer
- refs
- Reference scanning and fixing for broken file references
- rename
- File renaming transformer
- replace
- Regex find-and-replace transformer
- whitespace
- Whitespace cleaning transformer