From b57b85c3fef87a0e8b1920aecd2c006f351709c8 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sat, 26 Apr 2025 14:20:44 +0500 Subject: [PATCH] Fix config. --- .pre-commit-hooks.yaml | 12 +++++++----- go-test-cover.sh | 3 +++ go-test-mod-cover.sh | 5 ----- golangci-lint-mod.sh | 5 ----- golangci-lint.sh | 3 +++ 5 files changed, 13 insertions(+), 15 deletions(-) create mode 100755 go-test-cover.sh delete mode 100755 go-test-mod-cover.sh delete mode 100755 golangci-lint-mod.sh create mode 100755 golangci-lint.sh diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index faed2bd..2d4567a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,12 +1,14 @@ - id: go-test-mod-cover name: 'go-test-mod-cover' - entry: 'go-test-mod-cover.sh' + entry: 'go-test-cover.sh' language: 'script' - description: 'Run go test in module mode (GO111MODULE=on) with coverage report' + description: 'Run go test in module mode with coverage report.' pass_filenames: false + files: "*.go" - id: golangci-lint-mod name: 'golangci-lint-mod' - entry: 'golangci-lint-mod.sh' + entry: 'golangci-lint.sh' language: 'script' - description: 'Run golangci-lint in module mode (GO111MODULE=on)' - pass_filenames: false \ No newline at end of file + description: 'Run golangci-lint in module mode.' + pass_filenames: false + files: "*.go" diff --git a/go-test-cover.sh b/go-test-cover.sh new file mode 100755 index 0000000..6834cda --- /dev/null +++ b/go-test-cover.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +$(which go) test -cover diff --git a/go-test-mod-cover.sh b/go-test-mod-cover.sh deleted file mode 100755 index a907769..0000000 --- a/go-test-mod-cover.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh - -export GO111MODULE=on - -$(which go) test -cover ./... \ No newline at end of file diff --git a/golangci-lint-mod.sh b/golangci-lint-mod.sh deleted file mode 100755 index c1fd7b5..0000000 --- a/golangci-lint-mod.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh - -export GO111MODULE=on - -$(which golangci-lint) run ./... \ No newline at end of file diff --git a/golangci-lint.sh b/golangci-lint.sh new file mode 100755 index 0000000..434dbe8 --- /dev/null +++ b/golangci-lint.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +$(which golangci-lint) run