Skip to content

fix: suppress staticcheck SA1012 for intentional nil context test#1895

Merged
lpcox merged 2 commits intomainfrom
fix/staticcheck-nil-context
Mar 14, 2026
Merged

fix: suppress staticcheck SA1012 for intentional nil context test#1895
lpcox merged 2 commits intomainfrom
fix/staticcheck-nil-context

Conversation

@lpcox
Copy link
Collaborator

@lpcox lpcox commented Mar 14, 2026

Fixes staticcheck SA1012 lint error in sdk_method_dispatch_test.go. The test intentionally passes nil to GetAgentTagsSnapshotFromContext to verify graceful nil handling. Added nolint:staticcheck directive.

make agent-finished passes cleanly.

The test deliberately passes nil to verify GetAgentTagsSnapshotFromContext
handles nil context gracefully. Add nolint directive to suppress SA1012.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 14, 2026 22:30
Copy link
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

Suppresses staticcheck SA1012 in a unit test that intentionally passes a nil context.Context to verify graceful handling in GetAgentTagsSnapshotFromContext.

Changes:

  • Adds //nolint:staticcheck suppression for the intentional nil context test case.

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

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lpcox lpcox merged commit d20c968 into main Mar 14, 2026
10 checks passed
@lpcox lpcox deleted the fix/staticcheck-nil-context branch March 14, 2026 22:35
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.

2 participants