Skip to content

chore: migrate nvsnap and nvcf-unbound golangci-lint configs to v2#228

Open
mesutoezdil wants to merge 2 commits into
NVIDIA:mainfrom
mesutoezdil:mesutoezdil/chore/golangci-migrate-v2
Open

chore: migrate nvsnap and nvcf-unbound golangci-lint configs to v2#228
mesutoezdil wants to merge 2 commits into
NVIDIA:mainfrom
mesutoezdil:mesutoezdil/chore/golangci-migrate-v2

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

nvsnap and nvcf-unbound .golangci.yml were still v1 schema; golangci-lint v2 failed to load them. Migrated both to v2 with the official migrate tool, restored comments it stripped.

Tested: golangci-lint config verify passes for both. golangci-lint run now executes (358 pre-existing findings surfaced, out of scope here).

Refs: NO-REF

Both .golangci.yml files were still in v1 schema (no version field,
linters-settings, exclude-dirs, exclude-rules). golangci-lint v2
rejects them outright with "unsupported version of the configuration",
so linting has not been running for either module.

Migrated both with the official `golangci-lint migrate` command, then
hand-restored the explanatory comments it drops, in particular the
gosec exclude rationale in nvsnap (world-readable cache dirs needed
for cross-uid pod restore).

Verified both configs load with `golangci-lint config verify` and
`golangci-lint run` now executes instead of failing immediately.
nvsnap is Linux-only and does not type-check on this darwin host, so
also cross-compiled with GOOS=linux to confirm the lint pass itself
runs end to end (358 pre-existing findings surfaced, out of scope for
this change).

NO-REF

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil
mesutoezdil requested a review from a team as a code owner July 17, 2026 05:29
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Both Go services migrate their golangci-lint configurations to version 2. The changes restructure linter settings, revise enabled linters and exclusions, and configure formatter handling separately.

Changes

golangci-lint configuration migration

Layer / File(s) Summary
nvcf-unbound lint configuration
src/compute-plane-services/nvcf-unbound/.golangci.yml
Adds the version 2 schema, relocates goheader settings, and adds linter and formatter exclusions.
nvsnap linter configuration
src/compute-plane-services/nvsnap/.golangci.yml
Updates the run settings and enabled linter set, and moves linter-specific and revive rules into linters.settings.
nvsnap exclusions and formatters
src/compute-plane-services/nvsnap/.golangci.yml
Replaces legacy issue exclusions with version 2 exclusions and configures gofmt, goimports, local prefixes, and formatter exclusions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: migrating both golangci-lint configs to v2.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant