pre-commit: Add hook for running gofumpt #10

Merged
fyrchik merged 2 commits from a-savchuk/frostfs-qos:run-fumpt into master 2025-03-04 11:13:53 +00:00
2 changed files with 7 additions and 6 deletions

View file

@ -37,3 +37,9 @@ repos:
pass_filenames: false
types: [go]
language: system
- id: gofumpt
name: gofumpt check
entry: make fumpt
pass_filenames: false
types: [go]
language: system

View file

@ -24,12 +24,7 @@ GOFUMPT_DIR ?= $(abspath $(BIN))/gofumpt
GOFUMPT_VERSION_DIR ?= $(GOFUMPT_DIR)/$(GOFUMPT_VERSION)
# Run all code formatters
fmts: fmt imports
# Reformat code
fmt:
@echo "⇒ Processing gofmt check"
@gofumpt -s -w .
fmts: fumpt imports
# Reformat imports
imports: