Skip to content

build(deps): update dependency golangci/golangci-lint to v2.12.1#1092

Open
renovate[bot] wants to merge 2 commits intomainfrom
renovate/all-updates
Open

build(deps): update dependency golangci/golangci-lint to v2.12.1#1092
renovate[bot] wants to merge 2 commits intomainfrom
renovate/all-updates

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 2, 2026

This PR contains the following updates:

Package Type Update Change
golangci/golangci-lint uses-with minor v2.11.4v2.12.1

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

golangci/golangci-lint (golangci/golangci-lint)

v2.12.1

Compare Source

Released on 2026-05-01

  1. Linters bug fixes
    • gomodguard_v2: fix panic with migration suggestion
  2. Misc.
    • fix install.sh script (if you are still using an URL based on the branch master, please update to use https://golangci-lint.run/install.sh)

v2.12.0

Compare Source

Released on 2026-05-01

  1. New linters
  2. Linters new features or changes
    • dupl: from f665c8d to c99c5cf (extended detection)
    • funcorder: from 0.5.0 to 0.6.0 (new option: function)
    • goconst: add an option to ignore strings from tests
    • goconst: from 1.8.2 to 1.10.0 (extended detection)
    • gomodguard_v2: from 1.4.1 to 2.1.0 (major version with new configuration)
    • gosec: from 619ce21 to 2.26.1 (new checks: G124, G708, G709, G710)
    • govet: add inline analyzer
    • makezero: from 2.1.0 to 2.2.1 (support slice type aliases)
    • paralleltest: expose checkcleanup option
    • sloglint: from 0.11.1 to 0.12.0 (new options: allowed-keys, custom-funcs)
    • wsl_v5: from 5.6.0 to 5.8.0 (new option: cuddle-max-statements; new checks: after-decl, after-defer, after-expr, after-go, cuddle-group)
  3. Linters bug fixes
    • forbidigo: from 2.3.0 to 2.3.1
    • godot: from 1.5.4 to 1.5.6
    • govet-modernize: from 0.43.0 to 0.44.0
    • ireturn: from 0.4.0 to 0.4.1
    • rowserrcheck: from 1.1.1 to c5f79b8
  4. Misc.
    • Decrease cache entropy
    • Embed the JSON schema in the binary
    • Filter env vars when cloning the repository with the custom command

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Only on Sunday and Saturday (* * * * 0,6)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copilot AI review requested due to automatic review settings May 2, 2026 03:03
@renovate renovate Bot requested a review from a team as a code owner May 2, 2026 03:03
@renovate renovate Bot review requested due to automatic review settings May 2, 2026 03:03
@github-project-automation github-project-automation Bot moved this to Pending Review in SBOMscanner May 2, 2026
Copilot AI review requested due to automatic review settings May 2, 2026 14:41
@renovate renovate Bot force-pushed the renovate/all-updates branch from 019aac9 to 933a631 Compare May 2, 2026 14:41
@renovate renovate Bot review requested due to automatic review settings May 2, 2026 14:41
@renovate renovate Bot force-pushed the renovate/all-updates branch from 933a631 to 0d764b0 Compare May 4, 2026 06:05
@renovate renovate Bot requested review from Copilot and removed request for Copilot May 4, 2026 06:05
@renovate renovate Bot force-pushed the renovate/all-updates branch from 0d764b0 to 70688e3 Compare May 4, 2026 06:08
@renovate renovate Bot review requested due to automatic review settings May 4, 2026 06:08
@renovate renovate Bot force-pushed the renovate/all-updates branch from 70688e3 to 17480bb Compare May 4, 2026 07:13
@renovate renovate Bot requested review from Copilot and removed request for Copilot May 4, 2026 07:13
@renovate renovate Bot force-pushed the renovate/all-updates branch from 17480bb to 2791a42 Compare May 4, 2026 08:18
@renovate renovate Bot review requested due to automatic review settings May 4, 2026 08:18
@renovate renovate Bot force-pushed the renovate/all-updates branch from 2791a42 to e357923 Compare May 4, 2026 11:36
@renovate renovate Bot requested review from Copilot and removed request for Copilot May 4, 2026 11:36
@renovate renovate Bot force-pushed the renovate/all-updates branch from e357923 to 86346f7 Compare May 4, 2026 11:53
@renovate renovate Bot review requested due to automatic review settings May 4, 2026 11:53
@renovate renovate Bot changed the title build(deps): update all dependencies updates build(deps): update dependency golangci/golangci-lint to v2.12.1 May 4, 2026
@renovate renovate Bot force-pushed the renovate/all-updates branch from 86346f7 to ffcf7dc Compare May 4, 2026 12:29
@renovate renovate Bot requested review from Copilot and removed request for Copilot May 4, 2026 12:29
@renovate renovate Bot force-pushed the renovate/all-updates branch from ffcf7dc to 1aefddb Compare May 4, 2026 12:29
@renovate renovate Bot force-pushed the renovate/all-updates branch from 1aefddb to 7a36f42 Compare May 4, 2026 12:39
@renovate renovate Bot requested review from Copilot and removed request for Copilot May 4, 2026 12:39
@fabriziosestito fabriziosestito moved this from Pending Review to In Progress in SBOMscanner May 5, 2026
@fabriziosestito fabriziosestito self-assigned this May 5, 2026
Signed-off-by: Fabrizio Sestito <fabrizio.sestito@suse.com>
Copilot AI review requested due to automatic review settings May 5, 2026 07:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s Go linting toolchain to golangci-lint v2.12.1 and adjusts the codebase/config to satisfy newly enabled or updated linters (notably paralleltest and sloglint context-only logging), alongside some Go 1.18+ modernizations (any).

Changes:

  • Bump golangci-lint version to v2.12.1 (Makefile + CI workflow) and refresh .golangci.yml to match the updated “golden config” and new linters.
  • Update many tests to run in parallel (or explicitly //nolint:paralleltest where parallelism is unsafe).
  • Update logging calls to context-aware slog APIs (InfoContext/WarnContext/ErrorContext) and apply minor type modernizations (any).

Reviewed changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/e2e/workloadscan_test.go Adds //nolint:paralleltest rationale for shared Kind cluster.
test/e2e/registry_scan_test.go Adds //nolint:paralleltest rationale for shared Kind cluster.
Makefile Bumps GOLANGCI_LINT_VERSION to v2.12.1.
internal/webhook/v1alpha1/workloadscanconfiguration_webhook_test.go Adds t.Parallel() at test and subtest levels.
internal/webhook/v1alpha1/scanjob_webhook_test.go Adds t.Parallel() at test and subtest levels.
internal/webhook/v1alpha1/registry_webhook_test.go Adds t.Parallel() at test and subtest levels.
internal/webhook/v1alpha1/registry_validators_test.go Adds t.Parallel() at test and subtest levels.
internal/storage/workloadscanreport_watcher_test.go Runs testify suite test in parallel.
internal/storage/workloadscanreport_strategy_test.go Adds t.Parallel() at test and subtest levels.
internal/storage/workloadscanreport_registry_store.go Uses []any for table row cells.
internal/storage/transform.go Switches transform function signatures to any.
internal/storage/transform_test.go Adds t.Parallel() to unit tests.
internal/storage/table_convertor.go Uses []any return types for cell lists.
internal/storage/store_test.go Adds t.Parallel() to suite test; adjusts pointer creation in tests (currently broken).
internal/storage/repository/workloadscanreport_repository.go Formatting-only (blank line in struct).
internal/storage/repository/workloadscanreport_repository_test.go Runs suite and table-driven tests in parallel.
internal/storage/repository/generic_object_repository_test.go Runs suite test in parallel.
internal/messaging/subscriber_test.go Adds t.Parallel() to tests and subtests.
internal/messaging/publisher_test.go Adds t.Parallel() to tests.
internal/mcp/server_test.go Runs testify suites in parallel.
internal/mcp/middlewares.go Uses WarnContext for unauthorized requests.
internal/mcp/middlewares_test.go Adds t.Parallel() to tests and subtests.
internal/handlers/trivyreport/trivy_test.go Adds t.Parallel() to tests and subtests.
internal/handlers/scanjob_failure_test.go Adds t.Parallel(); switches to runtime.NewScheme() instead of generated scheme.
internal/handlers/scan_sbom.go Uses context-aware slog calls during cleanup/logging.
internal/handlers/scan_sbom_test.go Adds //nolint:paralleltest notes; switches to runtime.NewScheme().
internal/handlers/messages.go Formatting-only (blank lines in structs).
internal/handlers/generate_sbom.go Uses context-aware slog calls during cleanup/logging.
internal/handlers/generate_sbom_test.go Adds //nolint:paralleltest notes; switches to runtime.NewScheme().
internal/handlers/dockerauth/auth_test.go Adds //nolint:paralleltest notes due to global env var usage.
internal/handlers/create_catalog.go Uses context-aware slog calls during cleanup/logging.
internal/handlers/create_catalog_test.go Adds //nolint:paralleltest notes; switches to runtime.NewScheme(); parallelizes safe tests.
internal/filters/tag_test.go Adds t.Parallel() to tests and subtests.
internal/filters/platform_test.go Adds t.Parallel() to tests and subtests.
internal/controller/workloadscan_watch_helpers_test.go Adds t.Parallel() to tests and subtests.
internal/controller/workloadscan_controller.go Formatting-only (blank line in struct).
internal/controller/workloadscan_controller_test.go Adds t.Parallel() and adjusts bool pointer creation (currently broken).
internal/controller/vulnerabilityreport_controller.go Formatting-only (blank line in struct).
internal/controller/vulnerabilityreport_controller_test.go Adjusts manager options bool pointer creation (currently broken).
internal/controller/transform.go Switches transform function signature to any.
internal/controller/transform_test.go Adds t.Parallel() to unit test.
internal/controller/suite_test.go Runs ginkgo suite in parallel.
internal/controller/scanjob_controller.go Formatting-only (blank line in struct).
internal/controller/registry_scan_runner_test.go Adds t.Parallel() to tests and subtests.
internal/controller/indexer_test.go Adds t.Parallel() to tests and subtests.
internal/controller/image_workloadscan_watch_helpers_test.go Adds t.Parallel() to tests and subtests.
internal/controller/image_workloadscan_controller_test.go Adjusts manager options bool pointer creation (currently broken).
internal/cmdutil/bootstrap.go Uses InfoContext in retry logging.
internal/cel/tag.go Uses map[string]any for CEL eval input.
internal/cel/tag_test.go Adds t.Parallel() to tests and subtests.
internal/apiserver/database_checker.go Uses DebugContext for request-scoped logging.
internal/apiserver/admission/workloadscanreport.go Formatting-only (blank line in struct).
internal/apiserver/admission/workloadscanreport_test.go Adds t.Parallel() to tests and subtests.
cmd/controller/main.go Adjusts cache options; bool pointer creation is currently invalid (new(true)).
api/v1alpha1/workloadscanconfiguration_types.go Formatting-only (blank line before Items).
api/v1alpha1/vexhub_types.go Formatting-only (blank line before Items).
api/v1alpha1/scanjob_types.go Formatting-only (blank line before Items).
api/v1alpha1/registry_types.go Formatting-only (blank line before Items).
api/v1alpha1/registry_types_test.go Adds t.Parallel() to tests and subtests.
api/storage/v1alpha1/workloadscanreport_types.go Formatting-only (blank line before Items).
api/storage/v1alpha1/vulnerabilityreport_types.go Formatting-only (blank line before Items).
api/storage/v1alpha1/summary_test.go Adds t.Parallel() to test.
api/storage/v1alpha1/sbom_types.go Formatting-only (blank lines / field alignment).
api/storage/v1alpha1/image_types.go Formatting-only (blank lines / field grouping).
.golangci.yml Updates “golden config” header and enables/configures new/updated linters (incl. paralleltest).
.github/workflows/ci.yml Updates golangci-lint action version input to v2.12.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/controller/main.go
Comment on lines 223 to 226
}: {
// Read-only
UnsafeDisableDeepCopy: ptr.To(true),
UnsafeDisableDeepCopy: new(true),
},
Comment on lines 1404 to 1409
APIVersion: "apps/v1",
Kind: "ReplicaSet",
Name: "my-rs",
UID: "rs-uid",
Controller: ptr.To(true),
Controller: new(true),
},
Comment on lines 35 to 39
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: k8sClient.Scheme(),
Controller: config.Controller{
SkipNameValidation: ptr.Bool(true),
SkipNameValidation: new(true),
},
Comment on lines 29 to 33
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: k8sClient.Scheme(),
Controller: config.Controller{
SkipNameValidation: ptr.Bool(true),
SkipNameValidation: new(true),
},
Comment on lines 350 to 352
tryUpdate := func(input runtime.Object, _ k8sstorage.ResponseMeta) (runtime.Object, *uint64, error) {
return input, ptr.To(uint64(0)), nil
return input, new(uint64(0)), nil
}
Comment on lines 439 to 441
opts := k8sstorage.ListOptions{
SendInitialEvents: ptr.To(true),
SendInitialEvents: new(true),
Predicate: predicate,
Comment on lines 163 to 165
if err = os.Remove(reportFile.Name()); err != nil {
h.logger.Error("failed to remove temporary repoort file", "error", err)
h.logger.ErrorContext(ctx, "failed to remove temporary repoort file", "error", err)
}
Comment on lines 918 to +924
if !ok {
return nil, ptr.To(uint64(0)), errors.New("input is not of type *v1alpha1.SBOM")
return nil, new(uint64(0)), errors.New("input is not of type *v1alpha1.SBOM")
}

sbom.SPDX.Raw = []byte(`{"foo": "bar"}`)

return input, ptr.To(uint64(0)), nil
return input, new(uint64(0)), nil
@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented May 5, 2026

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants