[][src]Struct git_checks::builders::CommitSubjectBuilder

pub struct CommitSubjectBuilder { /* fields omitted */ }

Builder for CommitSubject.

Implementations

impl CommitSubjectBuilder[src]

pub fn min_summary(&mut self, value: usize) -> &mut Self[src]

The minimum length allowed for the summary line.

Configuration: Optional Default: 8

pub fn max_summary(&mut self, value: usize) -> &mut Self[src]

The maximum length allowed for the summary line.

Configuration: Optional Default: 78

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

Whether to deny work-in-progress commits or not.

Commit messages which mention WIP or wip at the beginning of their commit messages are rejected since they are (nominally) incomplete.

Configuration: Optional Default: true

pub fn check_rebase_commands(&mut self, value: 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.

Configuration: Optional Default: true

pub fn build(&self) -> Result<CommitSubject, String>[src]

Builds a new CommitSubject.

Errors

If a required field has not been initialized.

impl CommitSubjectBuilder[src]

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

Tolerated prefixes for commits.

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

Configuration: Optional Default: Vec::new()

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

Required prefixes for commits.

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

Configuration: Optional Default: Vec::new()

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

Forbidden prefixes for commits.

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

Configuration: Optional Default: Vec::new()

Trait Implementations

impl Clone for CommitSubjectBuilder[src]

impl Default for CommitSubjectBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.