Skip to content

Commit

Permalink
Simplify pre-commit setup
Browse files Browse the repository at this point in the history
No need to depend on a third-party hook repository when each of these
checks is easily defined and run through system commands.

This also allows us to actually run tests, which is current unsupported
(doublify/pre-commit-rust#19)
  • Loading branch information
zoni committed Jan 16, 2022
1 parent d25c6d8 commit 081eb6c
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@ repos:
rev: 9136088a246768144165fcc3ecc3d31bb686920a # frozen: v3.3.0
hooks:
- id: check-yaml
- repo: https://github.com/doublify/pre-commit-rust
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # frozen: v1.0
hooks:
- id: fmt
- id: cargo-check
- id: clippy
args: ["--", "-D", "warnings"]
- repo: local
hooks:
- id: rustfmt
name: Check formatting
entry: cargo fmt --
language: system
files: \.rs$
- id: tests
name: Run tests
entry: cargo test
language: system
files: \.rs$
pass_filenames: false
- id: clippy
name: Check clippy lints
entry: cargo clippy -- -D warnings
language: system
files: \.rs$
pass_filenames: false
- id: README
name: Render README.md
entry: docs/generate.sh
Expand Down

0 comments on commit 081eb6c

Please sign in to comment.