From 20dfb84f3844ae8446a444c3a18a0f2b39312543 Mon Sep 17 00:00:00 2001 From: AhmedGrati <48932084+AhmedGrati@users.noreply.github.com> Date: Fri, 10 Feb 2023 16:57:07 +0100 Subject: [PATCH] feat: integrate pre-commit hooks (#1559) * feat: integrate pre-commit hooks * Revert "feat: integrate pre-commit hooks" This reverts commit 4d1ce961678c3483c669d946b4c0d5515bb4142d. * add pre-commit-config file Signed-off-by: AhmedGrati * remove no-go-testing from pre-commit-hooks Signed-off-by: AhmedGrati --------- Signed-off-by: AhmedGrati --- .pre-commit-config.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 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 00000000..fff477c6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + - repo: https://github.com/dnephin/pre-commit-golang + rev: v0.5.0 + hooks: + - id: go-fmt + - id: go-imports + - id: golangci-lint + - id: go-unit-tests + - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook + rev: v8.0.0 + hooks: + - id: commitlint + stages: [commit-msg] + additional_dependencies: ["@commitlint/config-conventional"]