From 7ea655020b294096c2b7b763d77ffa48523b492f Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 4 Jul 2024 22:23:48 +0200 Subject: [PATCH] chore(deps): update dependencies --- .githooks/pre-commit | 11 +++++++++++ .golangci.yml | 14 +++----------- githooks-installer.sh | 7 +++++++ go.mod | 18 ++++++++---------- go.sum | 28 ++++++++++++---------------- plugin.go | 6 +++--- 6 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 .githooks/pre-commit create mode 100644 githooks-installer.sh diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100644 index 0000000..2d90586 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e -o pipefail + +# https://github.com/koalaman/shellcheck/wiki/SC2039#redirect-both-stdout-and-stderr +if ! command -v golangci-lint 2>&1 /dev/null; then + echo "golangci-lint is not installed" + exit 1 +fi + +exec golangci-lint --build-tags=race run "$@" diff --git a/.golangci.yml b/.golangci.yml index 6dc489c..c8c857c 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,21 +2,11 @@ run: timeout: 1m - skip-dirs: - - .github - - .git allow-parallel-runners: true -output: - format: colored-line-number # colored-line-number|line-number|json|tab|checkstyle|code-climate - linters-settings: wsl: allow-assign-and-anything: true - govet: - check-shadowing: true - golint: - min-confidence: 0.1 godot: scope: declarations capital: true @@ -34,7 +24,6 @@ linters-settings: range-loops: true for-loops: true nolintlint: - allow-leading-space: false require-specific: true linters: # All available linters list: @@ -74,6 +63,9 @@ linters: # All available linters list: