Skip to content

Commit d951e7e

Browse files
committed
Add pre-commit
1 parent eda62f4 commit d951e7e

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/main.yml

+10
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,13 @@ jobs:
1717
run: cargo build --verbose
1818
- name: Run tests
1919
run: cargo test --verbose
20+
21+
pre-commit:
22+
name: Pre-Commit
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Run pre-commit
29+
uses: pre-commit/action@v3.0.1

.pre-commit-config.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2024 Lexi Robinson
2+
# Licensed under the EUPL-1.2
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.5.0
6+
hooks:
7+
- id: check-byte-order-marker
8+
- id: check-executables-have-shebangs
9+
- id: check-json
10+
- id: check-merge-conflict
11+
- id: check-shebang-scripts-are-executable
12+
- id: check-toml
13+
- id: check-yaml
14+
- id: end-of-file-fixer
15+
- id: mixed-line-ending
16+
- id: trailing-whitespace
17+
- repo: https://github.com/doublify/pre-commit-rust
18+
rev: v1.0
19+
hooks:
20+
- id: fmt
21+
- id: clippy
22+
args: ["--fix", "--allow-staged"]

0 commit comments

Comments
 (0)