From a3496e345fedc770047f8950df538285a9a726a1 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 7 Jun 2023 00:20:44 +0200 Subject: [PATCH] chore: downgrade to go1.19 --- go.mod | 2 +- netlify.toml | 6 +++--- pkg/lint/lintersdb/custom_linters.go | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 583658cfb3f3..dda7bbeaac8d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/golangci/golangci-lint -go 1.20 +go 1.19 require ( 4d63.com/gocheckcompilerdirectives v1.2.1 diff --git a/netlify.toml b/netlify.toml index 32db72872c08..dcd0c45f1cf1 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [context.production.environment] - GO_VERSION = "1.20" + GO_VERSION = "1.19" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps" @@ -7,7 +7,7 @@ NPM_VERSION = "8.5.5" [context.deploy-preview.environment] - GO_VERSION = "1.20" + GO_VERSION = "1.19" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps" @@ -15,7 +15,7 @@ NPM_VERSION = "8.5.5" [context.branch-deploy.environment] - GO_VERSION = "1.20" + GO_VERSION = "1.19" NODE_VERSION = "17" # TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535 # NPM_FLAGS = "--legacy-peer-deps" diff --git a/pkg/lint/lintersdb/custom_linters.go b/pkg/lint/lintersdb/custom_linters.go index c26355a6ad18..2e2a5d807d05 100644 --- a/pkg/lint/lintersdb/custom_linters.go +++ b/pkg/lint/lintersdb/custom_linters.go @@ -1,7 +1,6 @@ package lintersdb import ( - "errors" "fmt" "path/filepath" "plugin" @@ -98,7 +97,8 @@ func (m *Manager) lookupPlugin(plug *plugin.Plugin, settings any) ([]*analysis.A if err != nil { analyzers, errP := m.lookupAnalyzerPlugin(plug) if err != nil { - return nil, errors.Join(err, errP) + // TODO(ldez): use `errors.Join` when we will upgrade to go1.20. + return nil, fmt.Errorf("%s: %w", err, errP) } return analyzers, nil @@ -119,7 +119,8 @@ func (m *Manager) lookupAnalyzerPlugin(plug *plugin.Plugin) ([]*analysis.Analyze return nil, err } - m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please the new plugin signature: https://golangci-lint.run/contributing/new-linters/#create-a-plugin") + m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please the new plugin signature:" + + "https://golangci-lint.run/contributing/new-linters/#create-a-plugin") analyzerPlugin, ok := symbol.(AnalyzerPlugin) if !ok {