2021-08-17 15:29:30 +08:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-yapf.git
|
|
|
|
sha: v0.16.0
|
2020-02-24 03:02:36 +08:00
|
|
|
hooks:
|
|
|
|
- id: yapf
|
|
|
|
files: \.py$
|
2021-08-17 15:29:30 +08:00
|
|
|
exclude: (?=third_party).*(\.py)$
|
2020-02-24 03:02:36 +08:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2021-08-17 15:29:30 +08:00
|
|
|
sha: a11d9314b22d8f8c7556443875b731ef05965464
|
2020-02-24 03:02:36 +08:00
|
|
|
hooks:
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: check-symlinks
|
|
|
|
- id: detect-private-key
|
|
|
|
files: (?!.*paddle)^.*$
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
files: \.md$
|
|
|
|
- id: trailing-whitespace
|
|
|
|
files: \.md$
|
2021-08-17 15:29:30 +08:00
|
|
|
- id: requirements-txt-fixer
|
|
|
|
exclude: (?=third_party).*$
|
|
|
|
- id: check-yaml
|
|
|
|
- id: check-json
|
|
|
|
- id: pretty-format-json
|
|
|
|
args:
|
|
|
|
- --no-sort-keys
|
|
|
|
- --autofix
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: flake8
|
|
|
|
aergs:
|
|
|
|
- --ignore=E501,E228,E226,E261,E266,E128,E402,W503
|
|
|
|
- --builtins=G,request
|
|
|
|
- --jobs=1
|
|
|
|
exclude: (?=third_party).*(\.py)$
|
|
|
|
- repo : https://github.com/Lucas-C/pre-commit-hooks
|
|
|
|
sha: v1.0.1
|
2020-02-24 03:02:36 +08:00
|
|
|
hooks:
|
|
|
|
- id: forbid-crlf
|
|
|
|
files: \.md$
|
|
|
|
- id: remove-crlf
|
|
|
|
files: \.md$
|
|
|
|
- id: forbid-tabs
|
|
|
|
files: \.md$
|
|
|
|
- id: remove-tabs
|
|
|
|
files: \.md$
|
2020-02-26 21:03:51 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
2021-08-17 15:29:30 +08:00
|
|
|
- id: clang-format
|
|
|
|
name: clang-format
|
|
|
|
description: Format files with ClangFormat
|
|
|
|
entry: bash .pre-commit-hooks/clang-format.hook -i
|
|
|
|
language: system
|
|
|
|
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
|
2020-02-26 21:03:51 +08:00
|
|
|
- id: copyright_checker
|
|
|
|
name: copyright_checker
|
2021-08-17 15:29:30 +08:00
|
|
|
entry: python .pre-commit-hooks/copyright-check.hook
|
2020-02-26 21:03:51 +08:00
|
|
|
language: system
|
|
|
|
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
|
2021-08-17 15:29:30 +08:00
|
|
|
exclude: (?=third_party|pypinyin).*(\.cpp|\.h|\.py)$
|