Struct git_checks::checks::CommitSubject [−][src]
pub struct CommitSubject { /* fields omitted */ }Check commit message subjects for invalid patterns.
Methods
impl CommitSubject[src]
impl CommitSubjectpub fn new() -> Self[src]
pub fn new() -> SelfChecks commit message subjects for invalid patterns
Patterns which are checked for:
- overly long or short summary lines;
- work-in-progress messages; and
fixup!andsquash!messages.
Commit messages which appear to have been auto generated by actions such as merging or reverting commits will skip the summary line length limit (if enforced).
ⓘImportant traits for &'a mut Rpub fn with_summary_limits(&mut self, min: usize, max: usize) -> &mut Self[src]
pub fn with_summary_limits(&mut self, min: usize, max: usize) -> &mut SelfCheck the summary line with the given limits.
ⓘImportant traits for &'a mut Rpub fn check_work_in_progress(&mut self, wip: bool) -> &mut Self[src]
pub fn check_work_in_progress(&mut self, wip: bool) -> &mut SelfChecks for work-in-progress commits
Commit messages which mention WIP or wip at the beginning of their commit messages are
rejected since they are (nominally) incomplete.
ⓘImportant traits for &'a mut Rpub fn check_rebase_commands(&mut self, rebase: bool) -> &mut Self[src]
pub fn check_rebase_commands(&mut self, rebase: bool) -> &mut SelfCheck for rebase commands
Rebase commands include commits which begin with fixup! or squash!. These subjects
are used to indicate that the commit belongs somewhere else in the branch and should be
completed before merging.
Trait Implementations
impl Debug for CommitSubject[src]
impl Debug for CommitSubjectfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for CommitSubject[src]
impl Default for CommitSubjectfn default() -> CommitSubject[src]
fn default() -> CommitSubjectReturns the "default value" for a type. Read more
impl Clone for CommitSubject[src]
impl Clone for CommitSubjectfn clone(&self) -> CommitSubject[src]
fn clone(&self) -> CommitSubjectReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for CommitSubject[src]
impl Copy for CommitSubjectimpl Check for CommitSubject[src]
impl Check for CommitSubjectfn name(&self) -> &str[src]
fn name(&self) -> &strThe name of the check.
fn check(&self, _: &CheckGitContext, commit: &Commit) -> Result<CheckResult>[src]
fn check(&self, _: &CheckGitContext, commit: &Commit) -> Result<CheckResult>Run the check.
Auto Trait Implementations
impl Send for CommitSubject
impl Send for CommitSubjectimpl Sync for CommitSubject
impl Sync for CommitSubject