-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.pre-commit-config.yaml
53 lines (53 loc) · 1.69 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 and version:
# ONNX_VERSION=$(brew list onnxruntime --versions | awk '{print $2}')
# ONNX_PATH=$(brew --prefix onnxruntime)
# b. Set environment variables:
# export LIBRARY_PATH=$ONNX_PATH/lib
# export C_INCLUDE_PATH=$ONNX_PATH/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]
- repo: local
hooks:
- id: generate-docs
name: Generate Docs
entry: bash -c 'make gen-component-doc'
language: system
files: ^pkg/component/.*\.(json|mdx)$
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args:
- --mapping
- "2"
- --sequence
- "4"
- --offset
- "2"
- --preserve-quotes
- --implicit_start