From 51b5db6116dc3fc8b9cb9417473732a937e66376 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 8 Apr 2025 04:47:23 +0200 Subject: [PATCH] feat: add golangci-lint-fmt pre-commit hook --- .pre-commit-hooks.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index dea4b598a090..9738d4b25755 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -8,12 +8,20 @@ pass_filenames: false - id: golangci-lint-full name: golangci-lint-full - description: Fast linters runner for Go. Runs on all files in the repo. Use this hook if you use pre-commit in CI. + description: Fast linters runner for Go. Runs on all files in the module. Use this hook if you use pre-commit in CI. entry: golangci-lint run --fix types: [go] language: golang require_serial: true pass_filenames: false +- id: golangci-lint-fmt + name: golangci-lint-fmt + description: Fast linters runner for Go. Formats all files in the repo. + entry: golangci-lint fmt + types: [go] + language: golang + require_serial: true + pass_filenames: false - id: golangci-lint-config-verify name: golangci-lint-config-verify description: Verifies the configuration file