pub struct Config {
pub repos: Vec<Repo>,
pub default_install_hook_types: Option<Vec<String>>,
pub default_language_version: IndexMap<String, String>,
pub default_stages: Option<Vec<String>>,
pub files: String,
pub exclude: String,
pub fail_fast: bool,
pub minimum_pre_commit_version: String,
}Expand description
A single pre-commit configuration, containing one or more repositories, each of which may reference one or more hooks.
Fields§
§repos: Vec<Repo>A list of repository mappings.
default_install_hook_types: Option<Vec<String>>An optional list of --hook-types.
If not supplied, this defaults to [pre-commit].
default_language_version: IndexMap<String, String>A mapping from language to the default language version that
should be used for that language, if a hook does not supply its
own language_version.
default_stages: Option<Vec<String>>The stages property for a hook, if a hook does not supply its
own stages.
files: StringThe global file include pattern.
exclude: StringThe global file exclude pattern.
fail_fast: boolWhether to have pre-commit stop running hooks after the first failure.
minimum_pre_commit_version: StringThe minimum version of pre-commit required.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn 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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more