Module: commands::format
Contents
StructsFormatArgs- Arguments for theformatcommand.
FormatOutcome- Outcome of a per-language format step.
format_cpp- Format C/C++ files viaclang-format.format_csharp- Format C# viadotnet format.format_python- Format Python files viaruff format.format_rust- Format Rust files viacargo fmt(runs against the whole workspaceformat_ts- Format JS/TS/JSON/CSS files via Biome (preferringbiomeoverbunx --bun biome).run- Executes theformatcommand.
resq_cli::commands::format::FormatArgs
Struct Arguments for theformat command.
Fields:
language: Option<String>- Language to format. If omitted, runs every detected language.check: bool- Report issues without rewriting files. Exits non-zero if any found.
- Args
fn group_id() -> Option<clap::Id>fn augment_args<'b>(__clap_app: clap::Command) -> clap::Commandfn augment_args_for_update<'b>(__clap_app: clap::Command) -> clap::Command
- FromArgMatches
fn from_arg_matches(__clap_arg_matches: &clap::ArgMatches) -> ::std::result::Result<Self, clap::Error>fn from_arg_matches_mut(__clap_arg_matches: & mut clap::ArgMatches) -> ::std::result::Result<Self, clap::Error>fn update_from_arg_matches(self: & mut Self, __clap_arg_matches: &clap::ArgMatches) -> ::std::result::Result<(), clap::Error>fn update_from_arg_matches_mut(self: & mut Self, __clap_arg_matches: & mut clap::ArgMatches) -> ::std::result::Result<(), clap::Error>
- CommandFactory
fn command<'b>() -> clap::Commandfn command_for_update<'b>() -> clap::Command
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
resq_cli::commands::format::FormatOutcome
Enum Outcome of a per-language format step. Variants:Clean- The formatter ran and made no changes (or found no issues in--check).Formatted- The formatter ran and either rewrote files or — in--check— found issues.Skipped(String)- Skipped: either no matching files or the required tool isn’t installed.Failed(String)- Formatter exited with a non-zero status unexpectedly.
fn passed(self: &Self) -> bool-trueiff the step should be treated as a pass for pre-commit gating.
- PartialEq
fn eq(self: &Self, other: &FormatOutcome) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
resq_cli::commands::format::format_cpp
Function Format C/C++ files viaclang-format.
Errors
Never — failures are reported viaFormatOutcome::Failed(stderr).
resq_cli::commands::format::format_csharp
Function Format C# viadotnet format.
Errors
Never — failures are reported viaFormatOutcome::Failed(stderr).
resq_cli::commands::format::format_python
Function Format Python files viaruff format.
Errors
Never — failures are reported viaFormatOutcome::Failed(stderr).
resq_cli::commands::format::format_rust
Function Format Rust files viacargo fmt (runs against the whole workspace
when files is empty).
Errors
Never — failures are reported viaFormatOutcome::Failed(stderr).
resq_cli::commands::format::format_ts
Function Format JS/TS/JSON/CSS files via Biome (preferringbiome over bunx --bun biome).
Errors
Never — failures are reported viaFormatOutcome::Failed(stderr).
resq_cli::commands::format::run
Function Executes theformat command.