From 7fbd18be4122b406b3273be98a1ee54bc3ec23c4 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 28 Aug 2024 14:16:27 +0300 Subject: [PATCH 1/2] [#25] Makefile: Use -trimpath while building Signed-off-by: Evgenii Stratonikov --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8667f50..eb6467c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ test: lib: @mkdir -pv $(OUT_DIR) - @go build -buildmode=plugin -o $(OUT_DIR)/external_linters.so $(PLUGIN_SOURCE) + @go build -buildmode=plugin -trimpath \ + -o $(OUT_DIR)/external_linters.so $(PLUGIN_SOURCE) lint: @golangci-lint run -- 2.45.2 From 007db8eff4d0d4e707ea0b8cebb4adebe7e588f2 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 28 Aug 2024 14:23:27 +0300 Subject: [PATCH 2/2] [#25] .golangci.yml: Replace exportloopref with copyloopvar Fix the warning: ``` WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar. ``` Signed-off-by: Evgenii Stratonikov --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 0a07763..7122c60 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -47,7 +47,7 @@ linters: - bidichk - durationcheck - exhaustive - - exportloopref + - copyloopvar - gofmt - goimports - misspell -- 2.45.2