pub struct LintCommand {
pub commit_range: Option<String>,
pub context_dir: Option<PathBuf>,
pub guidelines: Option<PathBuf>,
pub output: OutputFormat,
pub strict: bool,
pub quiet: bool,
pub verbose: bool,
pub show_passing: bool,
pub stdin: bool,
pub suggest: bool,
pub fix: bool,
pub allow_pushed: bool,
}Expand description
Lint command options - deterministically validates commit messages against guidelines (no AI, no network).
Fields§
§commit_range: Option<String>Commit range to lint (e.g., HEAD~3..HEAD, abc123..def456). Defaults to commits ahead of the default base branch (origin/main, origin/master, main, or master).
context_dir: Option<PathBuf>Path to custom context directory (defaults to .omni-dev/).
guidelines: Option<PathBuf>Accepted for CLI parity with check; unused by lint (there is no
AI prose guidelines file to load — deterministic rules come from
.omni-dev/commit-rules.yaml and .omni-dev/scopes.yaml instead).
output: OutputFormatOutput format.
strict: boolExits with error code if any issues found (including warnings).
quiet: boolOnly shows errors/warnings, suppresses info-level output.
verbose: boolShows the resolved rules/scopes configuration sources.
show_passing: boolIncludes passing commits in output (hidden by default).
stdin: boolReads a single commit message from standard input instead of a
commit range (for a commit-msg git hook call site).
suggest: boolPopulates a deterministic corrected-scope suggestion for each commit
with an unknown-scope/missing-scope issue, resolved from the
commit’s changed files against .omni-dev/scopes.yaml + ecosystem
defaults — no AI, no network. Report-only; use --fix to apply.
Requires a commit range (incompatible with --stdin, which has no
changed-files list to resolve a scope from).
fix: boolApplies --suggest’s deterministic scope corrections directly to
the repository, via the same AmendmentHandler path git commit message amend uses. No AI, no confirmation prompt — only ever
touches a commit with a resolvable unknown-scope/missing-scope
issue. Implies --suggest. Requires a commit range (incompatible
with --stdin).
allow_pushed: boolPermits --fix to amend commits already present in a detected
remote main branch (rewrites published history). Mirrors git commit message amend --allow-pushed / twiddle --allow-pushed.
Ignored without --fix.
Implementations§
Trait Implementations§
Source§impl Args for LintCommand
impl Args for LintCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for LintCommand
impl CommandFactory for LintCommand
Source§impl FromArgMatches for LintCommand
impl FromArgMatches for LintCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.