Skip to content

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

Merged
sbaum1994 merged 1 commit into
NVIDIA:mainfrom
mesutoezdil:mesutoezdil/chore/golangci-migrate-v2
Jul 22, 2026
Merged

chore: migrate nvsnap and nvcf-unbound golangci-lint configs to v2#228
sbaum1994 merged 1 commit into
NVIDIA:mainfrom
mesutoezdil:mesutoezdil/chore/golangci-migrate-v2

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

TL;DR

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

Issues

NO-REF

Summary by CodeRabbit

  • Chores
    • Updated automated code-quality checks across compute services.
    • Improved handling of generated code, examples, third-party files, and test-specific patterns.
    • Standardized formatting and linting rules for more consistent validation.
    • Refined security, style, and correctness checks while preserving service behavior.

@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

Warning

Review limit reached

@mesutoezdil, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 23de2d70-5d50-41e7-9570-7223a21db15c

📥 Commits

Reviewing files that changed from the base of the PR and between 3858c76 and 51e0189.

📒 Files selected for processing (2)
  • src/compute-plane-services/nvcf-unbound/.golangci.yml
  • src/compute-plane-services/nvsnap/.golangci.yml
📝 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 run settings and the 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

Suggested reviewers: balajinvda

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: migrating both golangci-lint configs to v2.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@kristinapathak

Copy link
Copy Markdown
Contributor

@mesutoezdil , can you please rebase off of main? It should fix the codeql failures.

@mesutoezdil
mesutoezdil force-pushed the mesutoezdil/chore/golangci-migrate-v2 branch from 8a621d1 to ed76048 Compare July 21, 2026 08:22
@mesutoezdil

Copy link
Copy Markdown
Contributor Author

done, thx

@mesutoezdil
mesutoezdil force-pushed the mesutoezdil/chore/golangci-migrate-v2 branch from ed76048 to 3858c76 Compare July 21, 2026 17:51
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 force-pushed the mesutoezdil/chore/golangci-migrate-v2 branch from 3858c76 to 51e0189 Compare July 21, 2026 18:28

@balajinvda balajinvda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@sbaum1994
sbaum1994 added this pull request to the merge queue Jul 22, 2026
Merged via the queue into NVIDIA:main with commit fde740f Jul 22, 2026
13 checks passed
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.

4 participants