HPNEX-14: feat(golang): rewrite plugin with gopls MCP server and gofmt hook - #449
Conversation
Update .gitignore to track .claude/settings.json while ignoring other Claude state files. Assisted-by: Claude:claude-sonnet-4-6[1m]
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (12)
💤 Files with no reviewable changes (2)
WalkthroughUpdates the Go plugin: bumps version to 0.2.0, adds gopls MCP server and a gopls-lsp dependency, converts command surface to skills (lint and lint-fix), adds PostToolUse gofmt hooks and script, adjusts marketplace/settings/claudelint, and updates docs and plugin manifests. ChangesGo Plugin Enhancement
Sequence Diagram(s)sequenceDiagram
participant Agent
participant MCP as gopls (MCP Server)
participant HooksRunner
participant Formatter as gofmt.sh
participant FS as FileSystem
Agent->>MCP: invoke tooling (MCP request)
MCP-->>Agent: tool result (e.g., edits or file path)
Agent->>HooksRunner: PostToolUse event (Write/Edit)
HooksRunner->>Formatter: pass JSON payload (tool_input.file_path)
Formatter->>FS: run `gofmt -w -s` on file
FS-->>Formatter: file updated
Formatter-->>HooksRunner: exit status
HooksRunner-->>Agent: hook result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/data.json`:
- Around line 1708-1715: Find the skill entries where "id" is "lint" and
"lint-fix" whose "description" is the YAML artifact string ">-" and replace that
value with a proper user-facing description (or an empty string/remove the
description property) so the docs renderer won't show the leaked YAML marker;
update the "description" field for the "lint" and "lint-fix" objects
accordingly.
In `@plugins/golang/README.md`:
- Around line 25-33: The Prerequisites section of plugins/golang/README.md only
lists gopls and gofmt but omits golangci-lint which the skills rely on; update
the Prerequisites (and the repeated block around lines 37-46) to include
golangci-lint as a required or optional dependency and give the install command
(e.g., go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)
and a brief note that some checks in the skills expect it to be present so users
won’t be surprised during setup.
In `@plugins/golang/skills/lint/SKILL.md`:
- Around line 35-50: The two unlabeled fenced code blocks in
plugins/golang/skills/lint/SKILL.md (the example "Found 15 issues" block and the
"Code passes all linter checks" block) should include a language tag to satisfy
markdownlint MD040; update both opening fences to use a tag like ```text (or
```none) so the blocks become ```text ... ``` instead of just ```, keeping the
block content unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 70ed958b-13fe-4e78-a293-505f963c1d4b
📒 Files selected for processing (14)
.claude-plugin/marketplace.json.claude/settings.json.claudelint.yaml.gitignorePLUGINS.mddocs/data.jsonplugins/golang/.claude-plugin/plugin.jsonplugins/golang/.mcp.jsonplugins/golang/README.mdplugins/golang/commands/lint-fix.mdplugins/golang/hooks/hooks.jsonplugins/golang/hooks/scripts/gofmt.shplugins/golang/skills/lint-fix/SKILL.mdplugins/golang/skills/lint/SKILL.md
💤 Files with no reviewable changes (2)
- plugins/golang/commands/lint-fix.md
- PLUGINS.md
Replaces the golangci-lint command and skill with gopls LSP integration via .mcp.json, a PostToolUse hook for automatic gofmt formatting, and a dependency on the gopls-lsp plugin from claude-plugins-official. Allowlists gopls in .claudelint.yaml mcp-prohibited rule. Assisted-by: Claude:claude-sonnet-4-6[1m]
441b45f to
a4151ea
Compare
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, cblecker The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test images |
|
/retest |
Summary
golangplugin (v0.1.0 → v0.2.0) to integrate thegoplsMCP server for Go code intelligence (go-to-definition, find references, hover docs, workspace symbols)PostToolUsehook that auto-runsgofmt -w -son any.gofile after write or edit operationslint-fixslash command with dedicatedgolang:lintandgolang:lint-fixskills; addsmcp-prohibitedrule to.claudelint.yamlwithgoplson the allowlistallowCrossMarketplaceDependenciesOn: ["claude-plugins-official"]to the marketplace, allowing thegopls-lspdependency to be resolved from the official marketplaceTest plan
golangplugin in a Go project and verify thegoplsMCP server connects successfully.gofile and confirmgofmtruns automatically via the hook/golang:lint-fixand confirm it discoversgolangci-lintand applies fixesmake lintto confirm the repo itself passes linting after these changesmake updateto verifymarketplace.jsonanddocs/data.jsonare consistentSummary by CodeRabbit
New Features
Updates
Configuration
Documentation