.pre-commit-config.yaml 1.3 KB
Newer Older
Z
Zhong Hui 已提交
1 2
-   repo: https://github.com/PaddlePaddle/mirrors-yapf.git
    sha: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37
J
jiangjiajun 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16
    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: end-of-file-fixer
    -   id: trailing-whitespace
    -   id: detect-private-key
    -   id: check-symlinks
    -   id: check-added-large-files
-   repo: local
J
jiangjiajun 已提交
17

J
jiangjiajun 已提交
18 19 20 21 22 23 24
    hooks:
    -   id: copyright_checker
        name: copyright_checker
        entry: python ./.copyright.hook
        language: system
        files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
        exclude: (?!.*third_party)^.*$
J
jiangjiajun 已提交
25

C
Channingss 已提交
26
-   repo: local
J
jiangjiajun 已提交
27 28 29 30 31 32 33 34
    hooks:
    -   id: clang-format-with-version-check
        name: clang-format
        description: Format files with ClangFormat.
        entry: bash ./tools/codestyle/clang_format.hook -i
        language: system
        files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$

C
Channingss 已提交
35
-   repo: local
J
jiangjiajun 已提交
36 37 38 39
    hooks:
    -   id: cpplint-cpp-source
        name: cpplint
        description: Check C++ code style using cpplint.py.
C
fix doc  
Channingss 已提交
40
        entry: bash ./tools/codestyle/cpplint_pre_commit.hook
J
jiangjiajun 已提交
41 42
        language: system
        files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$