Skip to content

Commit

Permalink
[lint] use pre-commit to auto check and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
user01 authored and user01 committed Dec 6, 2023
1 parent 80b3acd commit da4ec89
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 @@ -58,6 +58,7 @@ conda create -n wespeaker python=3.9
conda activate wespeaker
conda install pytorch=1.12.1 torchaudio=0.12.1 cudatoolkit=11.3 -c pytorch -c conda-forge
pip install -r requirements.txt
pre-commit install # for clean and tidy code
```

## 🔥 News
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ onnxruntime
soundfile==0.10.3.post1
pypeln==0.4.9
silero-vad @ git+https://github.com/pengzhendong/silero-vad.git
pre-commit==3.5.0

0 comments on commit da4ec89

Please sign in to comment.