Skip to content

Fix staticcheck S1009 lint error: remove redundant nil check on map#11915

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-lint-go-workflow-again
Jan 26, 2026
Merged

Fix staticcheck S1009 lint error: remove redundant nil check on map#11915
pelikhan merged 2 commits intomainfrom
copilot/fix-lint-go-workflow-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

The lint-go workflow was failing with staticcheck S1009 in pkg/cli/mcp_inspect.go:253.

Changes

  • Removed redundant nil check before len() call on map in buildFrontmatterFromWorkflowData()

In Go, len() on nil maps returns 0, making the nil check unnecessary:

// Before
if workflowData.Tools != nil && len(workflowData.Tools) > 0 {

// After  
if len(workflowData.Tools) > 0 {
Original prompt

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

Custom agent used: ci-cleaner
Tidies up the repository CI state by formatting sources, running linters, fixing issues, running tests, and recompiling workflows


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow lint-go Fix staticcheck S1009 lint error: remove redundant nil check on map Jan 26, 2026
Copilot AI requested a review from pelikhan January 26, 2026 17:45
@pelikhan pelikhan marked this pull request as ready for review January 26, 2026 17:52
@pelikhan pelikhan merged commit b4d7971 into main Jan 26, 2026
@pelikhan pelikhan deleted the copilot/fix-lint-go-workflow-again branch January 26, 2026 17:52
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