Skip to main content

Module git_commit_subject_matches

Module git_commit_subject_matches 

Source
Expand description

git_commit_subject_matches — each commit’s subject line (the first line of its message) must match a regex.

The subject-grammar member of the commit-validation family (git_commit_signed_off, git_commit_no_fixup, …): enforces a prefix + shape convention like pkg/path: lowercase summary (go / Gerrit), subsystem: description (node), or conventional-commit types. Unlike git_commit_message’s pattern: (which matches the whole subject + body), matches: is anchored to the subject alone, so ^…$ describes the first line exactly. For a subject-length cap use git_commit_message’s subject_max_length:.

Shares the family shape (the commit_range module): since: unset checks HEAD only; since: set checks <since>..HEAD, oldest-first, merge commits excluded unless include_merges:. Silent outside a git repo / with no commits; a bad since: ref hard-fails with a shallow-clone hint. since:’s {{env.X}} interpolation is resolved at config load by alint-dsl.

Check-only — alint can’t rewrite the user’s commit history.

Structs§

GitCommitSubjectMatchesRule

Functions§

build