Skip to content

[8.19] .golangci.yml: enable the modernize linter #50262

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

[8.19] .golangci.yml: enable the modernize linter #50262

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

golangci-lint.yml

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

Annotations

30 errors and 3 warnings
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): filebeat/tests/integration/legacy_metrics_integration_test.go#L230
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): 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 (windows-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 (windows-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 (windows-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 (windows-latest): libbeat/internal/testutil/util.go#L25
import 'math/rand' is not allowed from list 'main': superseded by math/rand/v2 (depguard)
lint (windows-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 (windows-latest): x-pack/filebeat/input/o365audit/poll/poll.go#L108
response body must be closed (bodyclose)
lint (windows-latest): filebeat/tests/integration/legacy_metrics_integration_test.go#L230
response body must be closed (bodyclose)
lint (windows-latest): filebeat/scripts/tester/main.go#L253
response body must be closed (bodyclose)
lint (windows-latest): winlogbeat/sys/winevent/event_test.go#L81
identifier "mensajeEnEspañol" contain non-ASCII character: U+00F1 'ñ' (asciicheck)
lint (macos-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 (macos-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 (macos-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 (macos-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 (macos-latest): libbeat/internal/testutil/util.go#L25
import 'math/rand' is not allowed from list 'main': superseded by math/rand/v2 (depguard)
lint (macos-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 (macos-latest): x-pack/filebeat/input/o365audit/poll/poll.go#L108
response body must be closed (bodyclose)
lint (macos-latest): filebeat/tests/integration/legacy_metrics_integration_test.go#L230
response body must be closed (bodyclose)
lint (macos-latest): filebeat/scripts/tester/main.go#L253
response body must be closed (bodyclose)
lint (macos-latest): winlogbeat/sys/winevent/event_test.go#L81
identifier "mensajeEnEspañol" contain non-ASCII character: U+00F1 'ñ' (asciicheck)
lint (ubuntu-latest)
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-go@v5, golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
lint (windows-latest)
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-go@v5, golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
lint (macos-latest)
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-go@v5, golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/