pub struct PreCommitHook {Show 21 fields
pub id: String,
pub additional_dependencies: Option<BTreeSet<String>>,
pub alias: Option<String>,
pub always_run: Option<bool>,
pub args: Option<Vec<String>>,
pub entry: Option<String>,
pub exclude: Option<String>,
pub exclude_types: Option<BTreeSet<FileType>>,
pub description: Option<String>,
pub files: Option<String>,
pub language: Option<Language>,
pub language_version: Option<String>,
pub log_file: Option<String>,
pub minimum_pre_commit_version: Option<usize>,
pub name: Option<String>,
pub pass_filenames: Option<bool>,
pub require_serial: Option<bool>,
pub stages: Option<BTreeSet<Stage>>,
pub types: Option<BTreeSet<FileType>>,
pub types_or: Option<BTreeSet<FileType>>,
pub verbose: Option<bool>,
}Expand description
Description for a pre-commit hook. https://pre-commit.com/#pre-commit-configyaml—hooks
Fields§
§id: StringAn identifier of the current hook https://pre-commit.com/#pre-commit-configyaml—hooks
additional_dependencies: Option<BTreeSet<String>>A list of additional_dependencies of the current hook https://pre-commit.com/#pre-commit-configyaml—hooks
alias: Option<String>An additional identifier of the current hook for pre-commit run <hookid> https://pre-commit.com/#pre-commit-configyaml—hooks
always_run: Option<bool>Run the current hook when no files matched https://pre-commit.com/#pre-commit-configyaml—hooks
args: Option<Vec<String>>List of additional parameters to pass to the current hook https://pre-commit.com/#pre-commit-configyaml—hooks
entry: Option<String>A command of the current hook https://pre-commit.com/#pre-commit-configyaml—hooks
exclude: Option<String>Exclude files that were matched by files.
exclude_types: Option<BTreeSet<FileType>>A list of file types to exclude of the current hook https://pre-commit.com/#pre-commit-configyaml—hooks
description: Option<String>Description of the hook. used for metadata purposes only.
files: Option<String>The pattern of files to run on.
language: Option<Language>A language the current hook is written in https://pre-commit.com/#pre-commit-configyaml—hooks
language_version: Option<String>Mappings for the default language versions of the current project https://pre-commit.com/#pre-commit-configyaml—top-level
log_file: Option<String>A log file of the current hook
minimum_pre_commit_version: Option<usize>Allows one to indicate a minimum compatible pre-commit version.
name: Option<String>Name of the hook - shown during hook execution.
pass_filenames: Option<bool>Whether to pass filenames to the current hook or not https://pre-commit.com/#pre-commit-configyaml—hooks
require_serial: Option<bool>If true this hook will execute using a single process instead of in parallel.
stages: Option<BTreeSet<Stage>>A stage of the current hook https://pre-commit.com/#pre-commit-configyaml—hooks
types: Option<BTreeSet<FileType>>List of file types to run on (AND).
types_or: Option<BTreeSet<FileType>>List of file types to run on (OR).
verbose: Option<bool>Display an output of the current hook even it passes https://pre-commit.com/#pre-commit-configyaml—hooks
Trait Implementations§
Source§impl Clone for PreCommitHook
impl Clone for PreCommitHook
Source§fn clone(&self) -> PreCommitHook
fn clone(&self) -> PreCommitHook
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreCommitHook
impl Debug for PreCommitHook
Source§impl Default for PreCommitHook
impl Default for PreCommitHook
Source§fn default() -> PreCommitHook
fn default() -> PreCommitHook
Source§impl<'de> Deserialize<'de> for PreCommitHookwhere
PreCommitHook: Default,
impl<'de> Deserialize<'de> for PreCommitHookwhere
PreCommitHook: Default,
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>,
Source§impl Ord for PreCommitHook
impl Ord for PreCommitHook
Source§fn cmp(&self, other: &PreCommitHook) -> Ordering
fn cmp(&self, other: &PreCommitHook) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PreCommitHook
impl PartialEq for PreCommitHook
Source§impl PartialOrd for PreCommitHook
impl PartialOrd for PreCommitHook
Source§impl Serialize for PreCommitHook
impl Serialize for PreCommitHook
impl Eq for PreCommitHook
impl StructuralPartialEq for PreCommitHook
Auto Trait Implementations§
impl Freeze for PreCommitHook
impl RefUnwindSafe for PreCommitHook
impl Send for PreCommitHook
impl Sync for PreCommitHook
impl Unpin for PreCommitHook
impl UnsafeUnpin for PreCommitHook
impl UnwindSafe for PreCommitHook
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.