-
Notifications
You must be signed in to change notification settings - Fork 19
/
.pre-commit-config.yaml
31 lines (31 loc) · 1.14 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: (?i).*testdata/
exclude_types: [svg, mdx]
- id: trailing-whitespace
exclude: (?i).*testdata/
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
# To make the golangci-lint hook work with ONNX:
# 1. Install ONNX runtime locally:
# - Mac: `brew install onnxruntime`
# - Linux: Follow https://github.com/streamer45/silero-vad-go
# 2. For Mac OS with Homebrew:
# a. Get install path: `brew info onnxruntime`
# b. Set environment variables:
# export LIBRARY_PATH=/opt/homebrew/Cellar/onnxruntime/1.17.1/lib
# export C_INCLUDE_PATH=/opt/homebrew/Cellar/onnxruntime/1.17.1/include/onnxruntime
# c. Run: sudo update_dyld_shared_cache
- id: golangci-lint
args: ["--build-tags", "onnx"]
- id: go-mod-tidy
- repo: https://github.com/pinglin/conventional-pre-commit
rev: v1.1.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]