Skip to content

fix: remove unused cleared variable causing lint failure#2038

Merged
lpcox merged 2 commits intolog/difc-sink-server-ids-37cf5ef4349005f5from
copilot/67273885685-fix-github-actions-workflow-lint
Mar 16, 2026
Merged

fix: remove unused cleared variable causing lint failure#2038
lpcox merged 2 commits intolog/difc-sink-server-ids-37cf5ef4349005f5from
copilot/67273885685-fix-github-actions-workflow-lint

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

The CI lint job was failing due to a declared-but-never-read variable cleared in internal/difc/sink_server_ids.go. The variable was assigned true in the empty-input early-return branch but the function returns immediately after, so the value was never consumed.

Change

  • internal/difc/sink_server_ids.go: Remove cleared bool from the var block and drop its assignment — the existing logSink.Print call already communicates the clearing behaviour.
// Before
var (
    cleared       bool
    normalizedOut []string
    duplicateIDs  []string
)
// ...
sinkServerIDs = nil
cleared = true  // assigned, never read

// After
var (
    normalizedOut []string
    duplicateIDs  []string
)
// ...
sinkServerIDs = nil
Original prompt

Fix the failing GitHub Actions workflow lint
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 67273885685
Job URL: https://github.com/github/gh-aw-mcpg/actions/runs/23156873563/job/67273885685


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] [67273885685] Fix failing GitHub Actions workflow lint fix: remove unused cleared variable causing lint failure Mar 16, 2026
Copilot AI requested a review from lpcox March 16, 2026 17:30
@lpcox lpcox marked this pull request as ready for review March 16, 2026 17:39
Copilot AI review requested due to automatic review settings March 16, 2026 17:39
@lpcox lpcox merged commit ffabdf4 into log/difc-sink-server-ids-37cf5ef4349005f5 Mar 16, 2026
@lpcox lpcox deleted the copilot/67273885685-fix-github-actions-workflow-lint branch March 16, 2026 17:39
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

This PR fixes a CI lint failure caused by a declared-but-never-read variable cleared in internal/difc/sink_server_ids.go. The variable was assigned but its value was never consumed before the function returned.

Changes:

  • Removed the unused cleared bool declaration and its assignment in SetSinkServerIDs.

💡 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.

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.

3 participants