.pre-commit-config.yaml 1.2 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 26 27 28 29 30 31 32 33 34 35 36 37

    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)$

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