Improve Project Quality and Fix CI Failures#10
Conversation
This commit introduces several improvements to the project's quality and fixes a number of CI failures. **Improvements:** - **`.editorconfig`:** A new `.editorconfig` file has been added to ensure consistent editor settings across different environments. - **Issue Templates:** GitHub issue templates for bug reports and feature requests have been added to streamline the contribution process. - **Pre-commit Hooks:** A new `.pre-commit-config.yaml` file has been added to automate code quality checks before commits. - **Refactoring:** The `dev.go` file has been refactored to reduce code duplication in the build commands. **Fixes:** - **`.golangci.yml`:** The configuration file has been corrected to be compatible with the linter version used in the CI environment. - **Markdown:** Fenced code blocks in Markdown files have been updated with the correct language specifiers. - **`gosec`:** The `gosec` configuration has been updated to generate valid SARIF reports. - **Dependencies:** The `internal/build` package has been restored to resolve build and test failures.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| } | ||
| results, err := buildBinaries(ctx, version, goos, goarch, race) | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
Bug: Build command flags --cli, --mcp, --all are never used
The refactoring to use buildBinaries() removed the logic that respected the --cli, --mcp, and --all flags. The old implementation used these flags to determine which binaries to build, but now buildBinaries() always builds both binaries regardless of which flags are passed. Users who expect --cli to build only the CLI binary will get both binaries built instead.
Additional Locations (1)
| if err != nil { | ||
| failCount += len(results) | ||
| continue | ||
| } |
There was a problem hiding this comment.
Bug: Release builds lose platform-specific output directories
The refactored newReleaseCommand no longer sets custom OutputDir for each platform build. The old code set config.OutputDir = fmt.Sprintf("dist/%s-%s-%s", binary.name, platform.goos, platform.goarch) to create distinct directories for each platform/binary combination. Since buildBinaries() doesn't set this, all platforms will build to the default directory, causing each subsequent platform build to overwrite the previous one.
Additional Locations (1)
| return fmt.Errorf("failed to build MCP: %w", err) | ||
| _, err := buildBinaries(ctx, "dev", runtime.GOOS, runtime.GOARCH, false) | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
Bug: Install command proceeds even when builds fail
The newInstallCommand discards the build results (assigned to _) and buildBinaries always returns nil for the error. The old code explicitly checked each Build() call and returned early on failure. Now the install step proceeds regardless of whether builds succeeded, potentially attempting to install non-existent or stale binaries.
This change improves the project's quality by adding an
.editorconfigfile, issue templates, and pre-commit hooks. It also fixes several CI failures and refactors thedev.gofile to reduce code duplication.PR created automatically by Jules for task 7118184923619042982
Note
Extracts a shared binary build helper used by
dev build/install/release; adds.editorconfig, pre-commit hooks, streamlined issue templates; updatesgolangci-lintconfig and tweaks docs.buildBinarieshelper ininternal/cli/commands/dev.goand uses it acrossbuild,install, andreleasecommands to remove duplicate build loops.julesonandjuleson-mcp..editorconfigfor consistent formatting..pre-commit-config.yamlwith YAML, whitespace,golangci-lint, andmarkdownlinthooks..github/ISSUE_TEMPLATE/*to simpler templates with triage labels..golangci.ymlsettings underlinters-settings, addsgosecSARIF output, and fixesoutput.formatsstructure; maintains test and exclusion rules.README.mdandCONTRIBUTING.md(code block language hints, layout).Written by Cursor Bugbot for commit ab3806f. This will update automatically on new commits. Configure here.