Skip to main content

Crate lintel_format

Crate lintel_format 

Source
Expand description

§lintel-format

Crates.io docs.rs GitHub License

Format command for Lintel. Provides the lintel format subcommand which formats JSON, YAML, TOML, and Markdown files using dprint formatter plugins.

Also used by lintel check to verify formatting and produce diffs for unformatted files.

§License

Apache-2.0

Structs§

FormatArgs
FormatConfig
Pre-built native configs for all formatters.
FormatDiagnostic
A formatting diagnostic: a file that is not properly formatted.
FormatResult

Functions§

check_format
Check formatting of files, returning diagnostics for unformatted files.
fix_format
Fix formatting of files in place.
format_args
Construct the bpaf parser for FormatArgs.
format_content
Format a single file’s content. Returns Ok(Some(formatted)) if the content changed, Ok(None) if already formatted, or Err on parse failure.
run
Run the format command: format files in place, or check with --check.