.pre-commit-config.yaml 1.3 KB
Newer Older
Y
yangyaming 已提交
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
-   repo: https://github.com/pre-commit/mirrors-yapf.git
    sha: v0.16.0
    hooks:
    -   id: yapf
        files: \.py$
-   repo: https://github.com/pre-commit/pre-commit-hooks
    sha: a11d9314b22d8f8c7556443875b731ef05965464
    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$
-   repo: https://github.com/Lucas-C/pre-commit-hooks
    sha: v1.0.1
    hooks:
    -   id: forbid-crlf
        files: \.md$
    -   id: remove-crlf
        files: \.md$
    -   id: forbid-tabs
        files: \.md$
    -   id: remove-tabs
        files: \.md$
-   repo: local
    hooks:
    -   id: clang-format
        name: clang-format
        description: Format files with ClangFormat
H
Hui Zhang 已提交
33
        entry: bash .pre-commit-hooks/clang-format.hook -i
Y
yangyaming 已提交
34 35
        language: system
        files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
H
Hui Zhang 已提交
36 37
    -   id: copyright_checker
        name: copyright_checker
H
Hui Zhang 已提交
38
        entry: python .pre-commit-hooks/copyright-check.hook
H
Hui Zhang 已提交
39 40
        language: system
        files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
H
Hui Zhang 已提交
41
        exclude: (?!.*third_party)^.*$ | (?!.*book)^.*$ | (?!.*decoders/swig)^.*$