Skip to content

Commit 3b2bd6b

Browse files
committed
feat: add pre-commit config
1 parent 0feae72 commit 3b2bd6b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,33 @@ repos:
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: check-json
9+
exclude: ^go-runner/testdata/
910
- id: check-merge-conflict
1011
- id: check-added-large-files
12+
13+
- repo: https://github.com/doublify/pre-commit-rust
14+
rev: v1.0
15+
hooks:
16+
- id: fmt
17+
args: [--all, --]
18+
files: ^go-runner/
19+
pass_filenames: false
20+
additional_dependencies: []
21+
entry: bash -c 'cd go-runner && cargo fmt --all'
22+
language: system
23+
24+
- id: cargo-check
25+
args: [--all-targets]
26+
files: ^go-runner/
27+
pass_filenames: false
28+
additional_dependencies: []
29+
entry: bash -c 'cd go-runner && cargo check --all-targets'
30+
language: system
31+
32+
- id: clippy
33+
args: [--all-targets, --, -D, warnings]
34+
files: ^go-runner/
35+
pass_filenames: false
36+
additional_dependencies: []
37+
entry: bash -c 'cd go-runner && cargo clippy --all-targets -- -D warnings'
38+
language: system

0 commit comments

Comments
 (0)