Struct git_checks::checks::RestrictedPath
[−]
[src]
pub struct RestrictedPath { /* fields omitted */ }
A check which denies commits which modify files underneath certain path.
Methods
impl RestrictedPath
[src]
fn new<S: ToString>(path: S) -> Self
Create a check which rejects modifications to files underneath a of given path.
fn required(&mut self, required: bool) -> &mut Self
Whether commits changing the path are errors or warnings.
Trait Implementations
impl Debug for RestrictedPath
[src]
impl Check for RestrictedPath
[src]
fn name(&self) -> &str
The name of the check.
fn check(&self, _: &CheckGitContext, commit: &Commit) -> Result<CheckResult>
Run the check.