Skip to content

Commit 46dd19d

Browse files
authored
[lint] use pre-commit to auto check and lint (#2195)
1 parent 6638d68 commit 46dd19d

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.pre-commit-config.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- repo: https://github.com/pycqa/flake8
7+
rev: '3.8.2'
8+
hooks:
9+
- id: flake8
10+
- repo: https://github.com/pre-commit/mirrors-yapf
11+
rev: 'v0.32.0'
12+
hooks:
13+
- id: yapf
14+
- repo: https://gitlab.com/daverona/pre-commit/cpp
15+
rev: '0.8.0'
16+
hooks:
17+
- id: cpplint
18+
- id: clang-format

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ git clone https://github.com/wenet-e2e/wenet.git
5959
conda create -n wenet python=3.8
6060
conda activate wenet
6161
pip install -r requirements.txt
62+
pre-commit install # for clean and tidy code
6263
```
6364

6465
**Build for deployment**

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ tqdm
1919
deepspeed
2020
librosa
2121
openai-whisper
22+
pre-commit==3.5.0

0 commit comments

Comments
 (0)