From 3bf24e239693fbed7887685473ea605e121bb13a Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 12 Jul 2024 11:36:15 +0300 Subject: [PATCH 1/2] golangci: migrate from deprecated `format` field usage This fixes ``` $ golangci-lint --version golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z $ golangci-lint run ./... WARN [config_reader] The configuration option `output.format` is deprecated, please use `output.formats` ``` The configuration file is updated according to https://golangci-lint.run/usage/configuration/. Signed-off-by: Anna Shaleva --- .golangci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 5c3ad60e1..c4d203296 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,7 +12,8 @@ run: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" - format: tab + formats: + - format: tab # all available settings of specific linters linters-settings: From 10b8e12dfede0edd603d3e05b3ffc45c5e4fdc7d Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 12 Jul 2024 11:37:05 +0300 Subject: [PATCH 2/2] golangci: drop outdated govet config According to https://golangci-lint.run/usage/linters/#govet, `check-shadowing` no longer exists. Now it should be ```yaml govet: disable: [shadow] ``` but `shadow` is disabled by default. Thus, whole `govet` section is not needed anymore. ``` $ golangci-lint --version golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z ``` Signed-off-by: Anna Shaleva --- .golangci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c4d203296..037146da4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,9 +22,6 @@ linters-settings: # 'default' case is present, even if all enum members aren't listed in the # switch default-signifies-exhaustive: true - govet: - # report about shadowed variables - check-shadowing: false linters: enable: