Skip to content

Commit

Permalink
[lint] use pre-commit to auto check and lint (#2195)
Browse files Browse the repository at this point in the history
  • Loading branch information
robin1001 authored Dec 6, 2023
1 parent 6638d68 commit 46dd19d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: '3.8.2'
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-yapf
rev: 'v0.32.0'
hooks:
- id: yapf
- repo: https://gitlab.com/daverona/pre-commit/cpp
rev: '0.8.0'
hooks:
- id: cpplint
- id: clang-format
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ git clone https://github.com/wenet-e2e/wenet.git
conda create -n wenet python=3.8
conda activate wenet
pip install -r requirements.txt
pre-commit install # for clean and tidy code
```

**Build for deployment**
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tqdm
deepspeed
librosa
openai-whisper
pre-commit==3.5.0

0 comments on commit 46dd19d

Please sign in to comment.