Skip to content

pre-commit fails #9587

Closed
Closed
@luotao1

Description

@luotao1

When I use pre-commit to git commit, there are mistakes like:

[luotao02: Paddle] var -> $ git commit
An error has occurred: InvalidConfigError: Invalid content: .pre-commit-config.yaml
{'repos': [{'repo': 'https://github.com/Lucas-C/pre-commit-hooks.git', 'sha': 'v1.0.1', 'hooks': [{'files': '(?!.*third_party)^.*$ | (?!.*book)^.*$', 'id': 'remove-crlf'}]}, {'repo': 'https://github.com/PaddlePaddle/mirrors-yapf.git', 'sha': '0d79c0c469bab64f7229c9aca2b1186ef47f0e37', 'hooks': [{'files': '(.*\\.(py|bzl)|BUILD|.*\\.BUILD|WORKSPACE)$', 'id': 'yapf'}]}, {'repo': 'https://github.com/pre-commit/pre-commit-hooks', 'sha': '5bf6c09bfa1297d3692cadd621ef95f1284e33c0', 'hooks': [{'id': 'check-added-large-files'}, {'id': 'check-merge-conflict'}, {'id': 'check-symlinks'}, {'files': '(?!.*third_party)^.*$ | (?!.*book)^.*$', 'id': 'detect-private-key'}, {'id': 'end-of-file-fixer'}]}, {'repo': 'local', 'hooks': [{'files': '\\.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$', 'description': 'Format files with ClangFormat.', 'language': 'system', 'entry': 'bash ./.clang_format.hook -i', 'id': 'clang-format-with-version-check', 'name': 'clang-format'}]}, {'repo': 'local', 'hooks': [{'files': '\\.(c|cc|cxx|cpp|cu|h|hpp|hxx)$', 'description': 'Check C++ code style using cpplint.py.', 'language': 'system', 'entry': 'bash ./tools/codestyle/cpplint_pre_commit.hook', 'id': 'cpplint-cpp-source', 'name': 'cpplint'}]}, {'repo': 'https://github.com/PaddlePaddle/pre-commit-golang', 'sha': '8337620115c25ff8333f1b1a493bd031049bd7c0', 'hooks': [{'id': 'go-fmt', 'types': ['go']}]}, {'repo': 'local', 'hooks': [{'files': '\\.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$', 'name': 'copyright_checker', 'language': 'system', 'entry': 'python ./.copyright.hook', 'exclude': '(?!.*third_party)^.*$ | (?!.*book)^.*$', 'id': 'copyright_checker'}]}]} is not of type u'array'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions