From 41949d8e07d98e7024fbeec3603057e3cbf0bf59 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Mon, 15 Mar 2021 10:16:49 -0500 Subject: [PATCH] Add golangci-lint to .pre-commit-config.yaml. This is the configuration for https://pre-commit.com/, which now also runs golangci-lint using the same version as CI (currently v1.33.0). Signed-off-by: Matt Moyer --- .pre-commit-config.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85e6853c..ad5bb0af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,6 @@ -exclude: '^(generated|hack/lib/tilt/tilt_modules)/' +# This is a configuration for https://pre-commit.com/. +# On macOS, try `brew install pre-commit` and then run `pre-commit install`. +exclude: '^(site|generated|hack/lib/tilt/tilt_modules)/' repos: - repo: git://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 @@ -21,3 +23,7 @@ repos: name: Validate copyright year entry: hack/check-copyright-year.sh language: script +- repo: https://github.com/golangci/golangci-lint + rev: v1.33.0 + hooks: + - id: golangci-lint