From 5533db15c3436f97b674ccef853ca25f4ed4f0e3 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 27 Jun 2023 11:57:31 +0800 Subject: [PATCH] chore: add pre-commit hook (#21858) --- .pre-commit-config.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..dd09b399f8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: check-json + - id: end-of-file-fixer + - id: trailing-whitespace + +repos: + - repo: https://github.com/psf/black + rev: stable + hooks: + - id: black + +repos: + - repo: https://github.com/pocc/pre-commit-hooks + rev: master + hooks: + - id: cppcheck + args: ["--error-exitcode=0"] + +repos: + - repo: https://github.com/crate-ci/typos + rev: v1.13.6 + hooks: + - id: typos-src + +repos: + - repo: https://github.com/TomWright/dasel + rev: v2.3.4 + hooks: + - id: dasel-validate -- GitLab