Added pre-commit
This commit is contained in:
parent
4bd7f9d411
commit
eaadf02220
2
.cargo/audit.toml
Normal file
2
.cargo/audit.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[advisories]
|
||||
ignore = ["RUSTSEC-2023-0071"]
|
66
.pre-commit-config.yaml
Normal file
66
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,66 @@
|
|||
fail_fast: true
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
args:
|
||||
- --allow-multiple-documents
|
||||
- id: check-toml
|
||||
- id: check-added-large-files
|
||||
- id: check-merge-conflict
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.31.1
|
||||
hooks:
|
||||
- id: typos
|
||||
args: ["--force-exclude"]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: fmt
|
||||
name: fmt
|
||||
description: Format files with cargo fmt.
|
||||
entry: cargo +nightly fmt
|
||||
language: system
|
||||
types: [rust]
|
||||
args: ["--", "--check"]
|
||||
# For some reason some formatting is different depending on how you invoke?
|
||||
pass_filenames: false
|
||||
|
||||
- id: clippy
|
||||
name: clippy
|
||||
description: Lint rust sources
|
||||
entry: cargo clippy
|
||||
language: system
|
||||
args: ["--", "-D", "warnings"]
|
||||
types: [file]
|
||||
files: (\.rs|Cargo.lock)$
|
||||
pass_filenames: false
|
||||
|
||||
- id: audit
|
||||
name: audit
|
||||
description: Audit packages
|
||||
entry: cargo audit
|
||||
language: system
|
||||
pass_filenames: false
|
||||
verbose: true
|
||||
always_run: true
|
||||
|
||||
- id: test
|
||||
name: test
|
||||
description: Rust test
|
||||
entry: cargo test
|
||||
language: system
|
||||
args: ["--workspace"]
|
||||
types: [file]
|
||||
files: (\.rs|Cargo.lock)$
|
||||
pass_filenames: false
|
||||
|
||||
- repo: https://github.com/hadolint/hadolint
|
||||
rev: v2.12.0
|
||||
hooks:
|
||||
- id: hadolint
|
|
@ -1661,7 +1661,6 @@ whoopingcrane
|
|||
widgeon
|
||||
widowspider
|
||||
wildcat
|
||||
wildebeast
|
||||
wildebeest
|
||||
willet
|
||||
wireworm
|
||||
|
|
|
@ -13,9 +13,9 @@ pub enum LdapError {
|
|||
Ldap(#[from] ldap3::LdapError),
|
||||
#[error("Key error: {0}")]
|
||||
FailedToParseKey(#[from] russh::Error),
|
||||
#[error("Mising environment variable: {0}")]
|
||||
#[error("Missing environment variable: {0}")]
|
||||
MissingEnvironmentVariable(&'static str),
|
||||
#[error("Mising environment variable: {0}")]
|
||||
#[error("Could not read password file: {0}")]
|
||||
CouldNotReadPasswordFile(#[from] std::io::Error),
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user