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.Source§impl Parser for LintCommand
impl Parser for LintCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for LintCommand
impl RefUnwindSafe for LintCommand
impl Send for LintCommand
impl Sync for LintCommand
impl Unpin for LintCommand
impl UnsafeUnpin for LintCommand
impl UnwindSafe for LintCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more