docs(#6247): add error-handling and constant-usage conventions to go-code.md - #6248
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
docs(#6247): add error-handling and constant-usage conventions to go-code.md#6248fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
…code.md Add an "Error handling and naming conventions" section covering four patterns identified from PR #6242 rework: 1. Use typed constants (e.g., repos.ForgeGitHub) over string literals 2. Prefer sentinel errors with errors.Is over string matching 3. Use %q for values in error messages instead of manual quoting 4. Keep error messages consistent across forges/providers These conventions are not enforceable by linters and were previously undocumented, causing repeated review findings on code agent PRs. Note: pre-commit could not run (sandbox network policy blocked git fetch during hook environment setup). The post-script runs pre-commit authoritatively on the runner. Closes #6247
|
🤖 Finished Review · ✅ Success · Started 2:35 AM UTC · Completed 2:47 AM UTC Commit: |
Site previewPreview: https://fb2b3115-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me Labels: PR modifies contributing documentation under docs/contributing/ |
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.
Summary
Adds an "Error handling and naming conventions" section to
docs/contributing/go-code.md, placed after "Concurrency testing" and before "Running the fullsend CLI". This documents four Go conventions that caused rework on PR #6242 but are not enforceable by linters.Changes
repos.ForgeGitHub/repos.ForgeGitLabinstead of raw"github"/"gitlab"strings; search for existing constants before introducing literalsvar errXxx = errors.New(...)and check witherrors.Is; do not usestrings.Contains(err.Error(), ...)%qfor values in error messages — consistent quoting, matches existing patterns intracker_client.goandforge_client.goTesting
make lint— pre-commit could not run in sandbox (network restriction); post-script runs it authoritativelyCloses #6247
Post-script verification
agent/6247-add-error-handling-conventions)3614b61b96067c6afaf8d92bc88899b711eb3330..HEAD)