Skip to content

[9.3] .golangci.yml: enable the modernize linter #50264

[9.3] .golangci.yml: enable the modernize linter

[9.3] .golangci.yml: enable the modernize linter #50264

Triggered via pull request July 15, 2026 08:35
Status Failure
Total duration 13m 0s
Artifacts

golangci-lint.yml

on: pull_request
Matrix: lint
Fit to window
Zoom out
Zoom in

Annotations

14 errors
lint (ubuntu-latest): x-pack/filebeat/input/azureblobstorage/mock/data_random.go#L11
import 'math/rand' is not allowed from list 'main': superseded by math/rand/v2 (depguard)
lint (ubuntu-latest): libbeat/tests/integration/mockserver.go#L32
import 'github.com/elastic/elastic-agent-client/v7/pkg/proto' is not allowed from list 'apache-licensed-code': Apache 2.0 licensed code cannot depend on Elastic licensed code (elastic-agent-client). (depguard)
lint (ubuntu-latest): libbeat/tests/integration/mockserver.go#L31
import 'github.com/elastic/elastic-agent-client/v7/pkg/client/mock' is not allowed from list 'apache-licensed-code': Apache 2.0 licensed code cannot depend on Elastic licensed code (elastic-agent-client). (depguard)
lint (ubuntu-latest): libbeat/tests/integration/mockserver.go#L30
import 'github.com/elastic/elastic-agent-client/v7/pkg/client' is not allowed from list 'apache-licensed-code': Apache 2.0 licensed code cannot depend on Elastic licensed code (elastic-agent-client). (depguard)
lint (ubuntu-latest): libbeat/internal/testutil/util.go#L25
import 'math/rand' is not allowed from list 'main': superseded by math/rand/v2 (depguard)
lint (ubuntu-latest): filebeat/inputsource/common/streaming/conn_test.go#L21
import 'math/rand' is not allowed from list 'main': superseded by math/rand/v2 (depguard)
lint (ubuntu-latest): x-pack/filebeat/input/o365audit/poll/poll.go#L108
response body must be closed (bodyclose)
lint (ubuntu-latest): heartbeat/monitors/active/http/task.go#L242
response body must be closed (bodyclose)
lint (ubuntu-latest): filebeat/scripts/tester/main.go#L253
response body must be closed (bodyclose)
lint (ubuntu-latest): winlogbeat/sys/winevent/event_test.go#L81
identifier "mensajeEnEspañol" contain non-ASCII character: U+00F1 'ñ' (asciicheck)
lint (windows-latest)
The strategy configuration was canceled because "golangci.ubuntu-latest" failed
lint (windows-latest)
The operation was canceled.
lint (macos-latest)
The strategy configuration was canceled because "golangci.ubuntu-latest" failed
lint (macos-latest)
The operation was canceled.