From c0525c2bc8a09716608ba76f294c98bd127ba580 Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Mon, 27 Jan 2025 11:19:57 +0100 Subject: [PATCH] Add autoupdate and extra go checking to pre-commit steps. --- .pre-commit-config.yaml | 10 +++++++++- Taskfile.yml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd16ba2..6782cf4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,9 +2,17 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files +- repo: https://github.com/dnephin/pre-commit-golang + rev: v0.5.1 + hooks: + - id: go-fmt + - id: go-imports + - id: no-go-testing + - id: golangci-lint + - id: go-unit-tests diff --git a/Taskfile.yml b/Taskfile.yml index 9ac78ec..ee9cd18 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -21,6 +21,7 @@ tasks: silent: true precommit: cmds: + - pre-commit autoupdate - pre-commit run --all silent: true lint: