Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-grafana-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
143 changes: 90 additions & 53 deletions .golangci.toml
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading