[][src]Struct git_checks::checks::CommitSubject

pub struct CommitSubject { /* fields omitted */ }

Check commit message subjects for invalid patterns.

Methods

impl CommitSubject
[src]

pub fn new() -> Self
[src]

Checks commit message subjects for invalid patterns

Patterns which are checked for:

  • overly long or short summary lines;
  • work-in-progress messages;
  • fixup! and squash! messages; and
  • custom prefixes.

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).

pub fn with_summary_limits(&mut self, min: usize, max: usize) -> &mut Self
[src]

Check the summary line with the given limits.

pub fn check_work_in_progress(&mut self, wip: bool) -> &mut Self
[src]

Checks 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.

pub fn check_rebase_commands(&mut self, rebase: bool) -> &mut Self
[src]

Check 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.

pub fn with_tolerated_prefixes<I, P>(&mut self, patterns: I) -> &mut Self where
    I: IntoIterator<Item = P>,
    P: Into<Regex>, 
[src]

Check for tolerated commit subject prefixes.

The specified prefix patterns will be tolerated regardless of any configured allowed or disallowed prefixes.

pub fn with_allowed_prefixes<I, P>(&mut self, prefixes: I) -> &mut Self where
    I: IntoIterator<Item = P>,
    P: Into<String>, 
[src]

Check for required commit prefixes.

The specified prefixes will be the only allowed prefixes on commit message subjects that do not match a tolerated pattern.

pub fn with_disallowed_prefixes<I, P>(&mut self, prefixes: I) -> &mut Self where
    I: IntoIterator<Item = P>,
    P: Into<String>, 
[src]

Check for disallowed commit prefixes.

The specified prefixes will be rejected on commit message subjects that do not also match a tolerated pattern.

Trait Implementations

impl Check for CommitSubject
[src]

impl Clone for CommitSubject
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for CommitSubject
[src]

impl Debug for CommitSubject
[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]