[−][src]Struct git_checks::builders::CommitSubjectBuilder
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]
impl CommitSubjectBuilder
[src]
pub fn tolerated_prefixes<I, P>(&mut self, patterns: I) -> &mut Self where
I: IntoIterator<Item = P>,
P: Into<Regex>,
[src]
I: IntoIterator<Item = P>,
P: Into<Regex>,
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]
I: IntoIterator<Item = P>,
P: Into<String>,
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]
I: IntoIterator<Item = P>,
P: Into<String>,
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]
fn clone(&self) -> CommitSubjectBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for CommitSubjectBuilder
[src]
fn default() -> CommitSubjectBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CommitSubjectBuilder
impl Send for CommitSubjectBuilder
impl Sync for CommitSubjectBuilder
impl Unpin for CommitSubjectBuilder
impl UnwindSafe for CommitSubjectBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,