Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,42 @@ repos:
.*\.lock
)$

# Autoformat: rust
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt
description: Formats all bin and lib files of the current workspace using rustfmt.
language: system
types: [rust]
args: ["--"]
Comment thread
consideRatio marked this conversation as resolved.
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy
description: Checks all packages in the workspace to catch common mistakes and improve your Rust code.
language: system
types: [rust]
args:
[
"--workspace",
"--all-targets",
"--all-features",
"--",
"--deny",
"warnings",
]
pass_filenames: false

# pre-commit.ci is a free automation service that can both run a validation job
# and push commits with fixes to PRs, and keep the versions of configured
# pre-commit hooks up to date by creating version bumping PRs.
#
# pre-commit.ci config reference: https://pre-commit.ci/#configuration
ci:
autoupdate_schedule: monthly
skip:
# The hooks rely on cargo being available, which it won't be in
# pre-commit.ci's runners, so we skip them from running there.
- cargo-fmt
- cargo-clippy