Skip to content

Commit fa974f3

Browse files
authored
Merge pull request #7 from mdgoldberg/chore/pre-commit
chore: Add pre-commit config
2 parents 8e3ba40 + 06ada3e commit fa974f3

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

.pre-commit-config.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: cargo-fmt
5+
name: cargo fmt
6+
entry: cargo fmt --all -- --check
7+
language: system
8+
types: [rust]
9+
pass_filenames: false
10+
11+
- id: cargo-check
12+
name: cargo check
13+
entry: cargo check --all
14+
language: system
15+
types: [rust]
16+
pass_filenames: false
17+
18+
- id: cargo-clippy
19+
name: cargo clippy
20+
entry: cargo clippy --all-targets --all-features -- -D warnings
21+
language: system
22+
types: [rust]
23+
pass_filenames: false
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v5.0.0
27+
hooks:
28+
- id: trailing-whitespace
29+
name: Fix trailing whitespace
30+
- id: end-of-file-fixer
31+
name: Fix end of file
32+
- id: check-yaml
33+
name: Check YAML syntax
34+
- id: check-toml
35+
name: Check TOML syntax
36+
- id: check-json
37+
name: Check JSON syntax
38+
- id: check-merge-conflict
39+
name: Check for merge conflict markers
40+
- id: check-added-large-files
41+
name: Check for large files
42+
args: ['--maxkb=500']
43+
- id: mixed-line-ending
44+
name: Check for mixed line endings
45+
args: ['--fix=lf']
46+
- id: check-case-conflict
47+
name: Check for case conflicts
48+
- id: check-symlinks
49+
name: Check for broken symlinks

notes.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)