obsidian-export/.pre-commit-config.yaml
Nick Groenen 081eb6c9ab
Simplify pre-commit setup
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
(https://github.com/doublify/pre-commit-rust/pull/19)
2022-01-16 17:06:52 +01:00

32 lines
883 B
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 9136088a246768144165fcc3ecc3d31bb686920a # frozen: v3.3.0
hooks:
- id: check-yaml
- 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
language: script
files: ^(README\.md)|(docs/.*)