From 188af9d533a45c44a1fd21c6bac666907004ad26 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Sat, 2 Sep 2023 09:23:44 -0500 Subject: [PATCH] Add pre-commit hooks for the repo This introduces pre-commit configurations to run golangci before any commits occur. Goal is to decrease the number of "fixup linter" type commit messages in the repo. --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 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 000000000..74abc3b88 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/golangci/golangci-lint + rev: v1.54.2 + hooks: + - id: golangci-lint