From 9f047e356e73a9066e90d4f1c847d1b6486cf3ae Mon Sep 17 00:00:00 2001 From: zhuwenxing Date: Wed, 1 Mar 2023 22:03:48 +0800 Subject: [PATCH] Add pre commit config (#22510) Signed-off-by: zhuwenxing --- .pre-commit-config.yaml | 19 +++++++++++++++++++ 1 file changed, 19 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..149df940c8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +repos: + - repo: https://github.com/dnephin/pre-commit-golang + rev: v0.5.0 + hooks: + - id: golangci-lint + args: [--config=.golangci.yml, --timeout=3m] + - repo: https://github.com/crate-ci/typos + rev: v1.13.10 + hooks: + - id: typos + - repo: https://github.com/zhuwenxing/trufflehog + rev: v3.28.5 + hooks: + - id: trufflehog + name: TruffleHog + description: Detect secrets in your data. + entry: bash -c 'trufflehog git file://. --max-depth 1 --since-commit HEAD --only-verified --fail' + language: system + stages: ["commit", "push"]