Skip to main content

Module lint

Module lint 

Source
Expand description

Deterministic, no-AI commit-message lint.

lint_message is the pure predicate behind omni-dev git commit message lint. It takes no git handle and does no I/O, so it is exhaustively unit-testable and shared with crate::git::commit::CommitInfoForAI::run_pre_validation_checks / crate::git::commit::refine_message_scope via parse_subject and the scope-check helpers below — one implementation, multiple consumers (#1474).

Structs§

ParsedSubject
A parsed conventional-commit subject line.

Functions§

lint_message
Runs every deterministic rule against message.
parse_subject
Parses a commit subject line (the first line of a commit message) into its conventional-commit parts. Returns None when the subject doesn’t match type(scope)?!?: description in any accepted form.
passes
Returns true when issues contains no IssueSeverity::Error entry — the same pass/fail split crate::data::check::CheckReport::exit_code uses.
suggest_scope_fix
Deterministically suggests a corrected message for an unknown-scope or missing-scope issue.