pre-commit 官网: https://pre-commit.com/ 介绍: 使用git的话,可以使用pre-commit钩子,在调用git commit 命令时会自动执行脚本进行检测,若代码出错
git-init#_template_directory https://github.com/thoughtworks/talisman#handling-existing-hooks https://pre-commit.com
下面是我的.pre-commit-config.yaml文件的样子: # See https://pre-commit.com for more information # See https://pre-commit.com
trailing-whitespace - repo: https://github.com/psf/black rev: 21.12b0 hooks: - id: black 更多配置介绍可以查看@pre-commit.com
/latest/cheat_sheet_py3.html [8] pytest: https://docs.pytest.org/en/latest/ [9] pre-commit: https://pre-commit.com
cpp-linter-hooks [14] cpp-linter-hooks: https://github.com/cpp-linter/cpp-linter-hooks [15] pre-commit: https://pre-commit.com
gitlab-workflow.yamlhttps://github.com/praetorian-inc/noseyparkerhttps://github.com/punk-security/secret-magpiehttps://pre-commit.com
100736498 clang-tidy:https://hokein.github.io/clang-tools-tutorial/clang-tidy.html pre-commit:https://pre-commit.com
black.readthedocs.io/en/stable/index.html [8] isort: https://pycqa.github.io/isort/ [9] 预提交: https://pre-commit.com