Fix S1011 staticcheck lint failure in central_slash_command_workflow.go#31858
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…l_slash_command_workflow.go Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job lint-go
Fix S1011 staticcheck lint failure in central_slash_command_workflow.go
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a golangci-lint / staticcheck S1011 issue by replacing a per-element append loop with an idiomatic append(dst, src...) when aggregating centralized slash-command routes.
Changes:
- Simplified route aggregation in
collectCentralSlashCommandRoutesusing a single spreadappend. - Minor whitespace-only change in the generated
agentic_commands.ymlworkflow file.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/central_slash_command_workflow.go | Replaces an inner append loop with append(..., buildCentralizedRoutes(...)...) to satisfy S1011. |
| .github/workflows/agentic_commands.yml | Adds a blank line in the permissions block (whitespace-only change). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Comment on lines
50
to
52
| discussions: write | ||
|
|
||
| steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Fix
What was the bug?
golangci-lint(staticcheck S1011) was failing CI onpkg/workflow/central_slash_command_workflow.go— aforloop was appending slice elements one-by-one instead of using the idiomaticappend(...spread)form.How did you fix it?
Replaced the inner loop with a single
appendcall using the spread operator:No behavioral change — purely a style/lint conformance fix.