| # See https://pre-commit.com for more information |
| # See https://pre-commit.com/hooks.html for more hooks |
| default_stages: [commit] |
| repos: |
| - repo: local |
| hooks: |
| - id: cpplint |
| name: cpplint |
| entry: cpplint |
| language: system |
| types: [c++] |
| args: [--verbose=4, --quiet] |
| exclude: '.*tests?.(cc|h)$' |
| stages: [push] |
| - id: cpplint_test |
| name: cpplint_test |
| entry: cpplint |
| language: system |
| types: [c++] |
| args: [--verbose=5, --quiet] |
| files: '.*tests?.(cc|h)$' |
| stages: [push] |
| - id: yapf |
| name: yapf |
| entry: yapf |
| language: system |
| types: [python] |
| args: [--style=yapf, -i] |
| - id: pylint |
| name: pylint |
| entry: pylint |
| language: system |
| types: [python] |
| args: [-d W0201] |
| stages: [push] |
| - id: clang-format |
| name: clang-format |
| entry: third_party/precommit-hooks/clang-format_wrapper.py |
| language: python |
| types: [c++] |
| args: [-i, -style=file] |
| - id: google-java-format |
| name: google-java-format |
| entry: third_party/precommit-hooks/google-java-format_wrapper.py |
| language: python |
| types: [java] |
| args: [-i] |
| - id: gcheckstyle |
| name: gcheckstyle |
| entry: third_party/precommit-hooks/gcheckstyle_wrapper.py |
| language: python |
| types: [java] |
| verbose: true |
| stages: [push] |