From 2ca81f39e879316739d7bc7971d93de13a2897e0 Mon Sep 17 00:00:00 2001 From: mishamyrt Date: Wed, 24 Apr 2024 23:10:09 +0300 Subject: [PATCH] chore: lint golang code on pre-commit --- lefthook.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lefthook.yaml b/lefthook.yaml index 9a2e6ba..da87596 100644 --- a/lefthook.yaml +++ b/lefthook.yaml @@ -1,6 +1,14 @@ pre-commit: commands: - format: + lint-backend-revive: + stage_fixed: true + glob: "*.go" + run: revive -config ./revive.toml ./... + lint-backend-golangci: + stage_fixed: true + glob: "*.go" + run: golangci-lint run ./... + format-ui: priority: 1 stage_fixed: true root: "ui/"