Skip to main content

Crate reformat_core

Crate reformat_core 

Source
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 converter::CaseConverter;
pub use emoji::EmojiOptions;
pub use emoji::EmojiTransformer;
pub use group::FileGrouper;
pub use group::GroupOptions;
pub use group::GroupResult;
pub use group::GroupStats;
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 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
converter
Case converter implementation for file processing
emoji
Emoji removal and replacement transformer
group
File grouping transformer - organizes files by common prefix into subdirectories
refs
Reference scanning and fixing for broken file references
rename
File renaming transformer
whitespace
Whitespace cleaning transformer

Type Aliases§

Result