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.
FormatResult

Functions§

check_format
Check formatting of files, returning diagnostics for unformatted files.
check_format_contents
Check formatting of pre-read file contents, returning diagnostics for unformatted files.
check_format_files
Check formatting of pre-discovered files, returning diagnostics.
fix_format
Fix formatting of files in place.
fix_format_files
Fix formatting of pre-discovered files in place.
format_args
Construct the bpaf parser for FormatArgs.
format_config_from_lintel
Build a FormatConfig from a lintel_config::Config.
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.