From d2c51cdbee7080cef56e7b67d43f62a7761064e1 Mon Sep 17 00:00:00 2001 From: "renovate-sh-app[bot]" <219655108+renovate-sh-app[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 00:05:00 +0000 Subject: [PATCH 1/3] chore(deps): Update dependency go to v1.25.1 | datasource | package | from | to | | -------------- | ------- | ------ | ------ | | golang-version | go | 1.24.6 | 1.25.1 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 78462c89e..558c35b0d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/grafana/grafana-plugin-sdk-go -go 1.24.6 +go 1.25.1 require ( github.com/apache/arrow-go/v18 v18.4.1 From 82db2108b3677141c951eebe73dac3858c58ec7d Mon Sep 17 00:00:00 2001 From: Giuseppe Guerra Date: Wed, 24 Sep 2025 08:34:54 +0200 Subject: [PATCH 2/3] Bump go-version in check-grafana-compatibility workflow --- .github/workflows/check-grafana-compatibility.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-grafana-compatibility.yml b/.github/workflows/check-grafana-compatibility.yml index da9bc3616..cd969db5e 100644 --- a/.github/workflows/check-grafana-compatibility.yml +++ b/.github/workflows/check-grafana-compatibility.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0 with: cache: false - go-version: "~1.22" + go-version: "~1.25" check-latest: true - name: Check if branch exists in Grafana From caeca42b4572b7ad35220d0be24cd1578bc2f9e3 Mon Sep 17 00:00:00 2001 From: Giuseppe Guerra Date: Wed, 24 Sep 2025 08:35:08 +0200 Subject: [PATCH 3/3] Bump golangci-lint to version that supports Go 1.25 --- .github/workflows/ci.yml | 2 +- .golangci.toml | 143 ++++++++++++++++++++++++--------------- 2 files changed, 91 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c7c0d1af..8138c40fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 with: - version: v1.64.2 + version: v2.5.0 args: | "./..." --timeout=7m skip-cache: true diff --git a/.golangci.toml b/.golangci.toml index 556aab173..4df79d74c 100644 --- a/.golangci.toml +++ b/.golangci.toml @@ -1,63 +1,100 @@ -[issues] -exclude-files = ["data/.*\\.gen\\.go", "data/generic_nullable_vector\\.go", "data/generic_vector\\.go"] +version = '2' -[linters-settings.goconst] +[linters] +default = 'none' +enable = [ + 'asciicheck', + 'bodyclose', + 'copyloopvar', + 'depguard', + 'dogsled', + 'errcheck', + 'errorlint', + 'gochecknoinits', + 'goconst', + 'gocritic', + 'gocyclo', + 'goprintffuncname', + 'gosec', + 'govet', + 'ineffassign', + 'misspell', + 'nakedret', + 'revive', + 'rowserrcheck', + 'sqlclosecheck', + 'staticcheck', + 'thelper', + 'unconvert', + 'unparam', + 'unused', + 'whitespace' +] + +[linters.settings] +[linters.settings.depguard] +[linters.settings.depguard.rules] +[linters.settings.depguard.rules.main] +[[linters.settings.depguard.rules.main.deny]] +pkg = 'io/ioutil' +desc = 'Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.' + +[linters.settings.goconst] min-len = 5 min-occurrences = 5 -[linters-settings.revive] -ignore-generated-header = false +[linters.settings.gosec] +excludes = [ + 'G115' +] -[linters-settings.misspell] -ignore-words = ["unknwon"] +[linters.settings.misspell] +ignore-rules = [ + 'unknwon' +] -[linters-settings.depguard.rules.main] -allow = [] # allow all -deny = [ - { pkg = "io/ioutil", desc = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." }, +[linters.exclusions] +generated = 'lax' +presets = [ + 'comments', + 'common-false-positives', + 'legacy', + 'std-error-handling' +] +paths = [ + 'data/.*\.gen\.go', + 'data/generic_nullable_vector\.go', + 'data/generic_vector\.go', + 'third_party$', + 'builtin$', + 'examples$' ] -[linters] -disable-all = true +# Don't require that errors are included through wrapping, since might not always want to wrap an error +[[linters.exclusions.rules]] +linters = [ + 'errorlint' +] +text = 'non-wrapping format verb for fmt.Errorf' + +[[linters.exclusions.rules]] +linters = [ + 'staticcheck' +] +text = 'SA1019' + +[formatters] enable = [ - "bodyclose", - "depguard", - "dogsled", - "errcheck", - "gochecknoinits", - "goconst", - "gocritic", - "goimports", - "goprintffuncname", - "gosec", - "gosimple", - "govet", - "ineffassign", - "misspell", - "nakedret", - "rowserrcheck", - "copyloopvar", - "staticcheck", - "stylecheck", - "typecheck", - "unconvert", - "unused", - "whitespace", - "gocyclo", - "unparam", - "dogsled", - "asciicheck", - "errorlint", - "sqlclosecheck", - "thelper", - "revive" + 'goimports' +] + +[formatters.exclusions] +generated = 'lax' +paths = [ + 'data/.*\.gen\.go', + 'data/generic_nullable_vector\.go', + 'data/generic_vector\.go', + 'third_party$', + 'builtin$', + 'examples$' ] -# Don't require that errors are included through wrapping, since might not always want to wrap an error -[[issues.exclude-rules]] -linters = ["errorlint"] -text = "non-wrapping format verb for fmt.Errorf" -[[issues.exclude-rules]] -linters = ["staticcheck"] -text = "SA1019" -[linters-settings.gosec] -excludes = ["G115"] \ No newline at end of file