Skip to content

Commit

Permalink
Merge branch 'ci/pre-push-hooks'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ablesius committed Nov 18, 2024
2 parents a6b4295 + ff8e498 commit d7c9844
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-vcs-permalinks
- id: check-yaml
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-added-large-files
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy
- repo: local
- repo: https://github.com/AndrejOrsula/pre-commit-cargo
rev: 0.3.0
hooks:
# source: https://github.com/AndrejOrsula/pre-commit-cargo/blob/67040d6a664d4431d07bea87683a1f916f8a8437/.pre-commit-hooks.yaml#L37
- id: cargo-test
name: cargo test
description: Execute unit and integration tests of Rust code.
language: rust
stages: [pre-push]
files: (Cargo.(toml|lock)|\.rs$)
pass_filenames: false
entry: cargo test
args: [ "--workspace" ]
- id: cargo-test
stages:
# in order for these to work, run `pre-commit install --hook-type pre-commit --hook-type pre-push --hook-type pre-merge-commit` after setting up once!
- pre-push
- pre-merge-commit

0 comments on commit d7c9844

Please sign in to comment.