From 381af34129fdb85da240b4c7f0e307a84d2b2f3e Mon Sep 17 00:00:00 2001 From: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:47:59 -0500 Subject: [PATCH] fix: go formatting stuff werent running through entire directory (#23) --- .pre-commit-config.yaml | 5 +++-- Taskfile.yaml | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ded1a6f..7f82b6b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,15 +6,16 @@ repos: - id: check-added-large-files - id: check-merge-conflict - id: end-of-file-fixer - exclude: "backend/docs/" + exclude: 'backend/docs/' - id: trailing-whitespace - id: no-commit-to-branch - args: ["--branch", "main"] + args: ['--branch', 'main'] - repo: local hooks: - id: format language: python name: Run Format + require_serial: true entry: bash -c 'task format' - repo: https://github.com/commitizen-tools/commitizen rev: v3.13.0 diff --git a/Taskfile.yaml b/Taskfile.yaml index 9464db8..e56ba02 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -10,11 +10,13 @@ tasks: format: - | + echo -e "Frontend Formatting..." cd client npm run format + echo -e "\nBackend Formatting...\n" cd ../backend - go fmt - go vet + go fmt ./... + go vet ./... swag f start-backend: @@ -47,5 +49,6 @@ tasks: pre-commit: - | + pre-commit clean pre-commit install --hook-type commit-msg --hook-type pre-push --hook-type pre-commit pre-commit run --all-files