formatting

Structs

FormatSummary

Result of formatting a file or directory tree.

Properties

files_checked

Type: usize

Pax-bearing source files inspected.

changed_files

Type: Vec<PathBuf>

Files whose canonical representation differs from disk.

Functions

format_file

pub fn format_file(file_path: &str) -> Result<(), Report>

Format either a .pax file or an inlined Pax template inside a Rust file.


format_path

pub fn format_path(path: &Path, check: bool) -> Result<FormatSummary, Report>

Format a .pax/.rs file or every Pax-bearing source file below a directory.

Directory traversal skips generated and dependency directories (.git, .pax, target, and node_modules). When check is true, files are inspected but not written, and changed paths are returned in [FormatSummary::changed_files].


format_pax_template

pub fn format_pax_template(code: String) -> Result<String, Report>

Format one Pax template string.