Skip to content

Fix gosimple S1008 linter violation in update_check.go#7071

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-lint-go-workflow
Dec 20, 2025
Merged

Fix gosimple S1008 linter violation in update_check.go#7071
pelikhan merged 2 commits intomainfrom
copilot/fix-lint-go-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 20, 2025

The lint-go workflow failed due to golangci-lint v1.62.2 flagging an unnecessarily verbose if-else return pattern in isRunningAsMCPServer().

Changes

  • Simplified boolean return logic in pkg/cli/update_check.go to satisfy gosimple linter rule S1008

Before:

if os.Getenv("GH_AW_MCP_SERVER") != "" {
    return true
}
return false

After:

return os.Getenv("GH_AW_MCP_SERVER") != ""

The simplified version is semantically identical and more idiomatic Go.

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: 58615949052

Job URL: https://github.com/githubnext/gh-aw/actions/runs/20397880814/job/58615949052


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow lint-go Fix gosimple S1008 linter violation in update_check.go Dec 20, 2025
Copilot AI requested a review from pelikhan December 20, 2025 17:59
@pelikhan pelikhan marked this pull request as ready for review December 20, 2025 18:00
@pelikhan pelikhan merged commit 3552f76 into main Dec 20, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/fix-lint-go-workflow branch December 20, 2025 18:00
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