Struct git_checks::config::CommitSubjectConfig
source · [−]pub struct CommitSubjectConfig { /* private fields */ }
Expand description
Configuration for the CommitSubject
check.
No configuration is necessary. The defaults are guided by common commit message guidelines.
Field | Type | Default |
---|---|---|
min_summary | positive integer | 8 |
max_summary | positive integer | 78 |
check_work_in_progress | boolean | true |
check_rebase_commands | boolean | true |
check_suggestion_subjects | boolean | false |
The prefix configurations are lists of strings that are by default empty lists. The
tolerated_prefixes
key is interpreted as a list of regular expressions.
This check is registered as a commit check with the name `“commit_subject”.
Example
{
"min_summary": 8,
"max_summary": 78,
"check_work_in_progress": true,
"check_rebase_commands": true,
"check_suggestion_subjects": true,
"tolerated_prefixes": [
"regex"
],
"allowed_prefixes": [
"literal"
],
"disallowed_prefixes": [
"literal"
]
}
Trait Implementations
sourceimpl Debug for CommitSubjectConfig
impl Debug for CommitSubjectConfig
sourceimpl<'de> Deserialize<'de> for CommitSubjectConfig
impl<'de> Deserialize<'de> for CommitSubjectConfig
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl IntoCheck for CommitSubjectConfig
impl IntoCheck for CommitSubjectConfig
type Check = CommitSubject
type Check = CommitSubject
The check parsed by this configuration.
sourcefn into_check(self) -> Self::Check
fn into_check(self) -> Self::Check
Create a new instance of the check from the configuration.
Auto Trait Implementations
impl RefUnwindSafe for CommitSubjectConfig
impl Send for CommitSubjectConfig
impl Sync for CommitSubjectConfig
impl Unpin for CommitSubjectConfig
impl UnwindSafe for CommitSubjectConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more