[refactor] consolidate vendored code under internal/; fold doc-coverage into module_test#163
Conversation
…ge into module_test Two structure tidies from review: 1. Move the vendored jsonrepair runtime from lib/json/internal/jsonrepair to the top-level internal/jsonrepair. The repo now has a single internal/ tree, so all vendored third-party code lives in one place — easier to find and to license-audit (which matters as this goes open source). The trade-off is wider visibility (module-wide instead of lib/json-only), acceptable for a leaf utility with one consumer. Updates the import, codecov/.codacy ignore paths, and the CLAUDE.md vendoring guidance (vendored code goes under the top-level internal/). 2. Fold the standalone doc_coverage_test.go (one test, 94 lines) into module_test.go, whose theme is exactly the builtin-module registry and its metadata — TestDocCoverage and its libReadmeDir/moduleSurface helpers now live beside TestListBuiltinModules / TestModuleCapabilities, one fewer root-level test file. No behavior change. go.sum unchanged (jsonrepair stays zero-dep); make doc-check still 234/234; gofmt/vet clean; -race -count=2 and the go1.19 floor green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 19 |
| Duplication | 0 |
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (2e6daea) 7692 7276 94.59% Head commit (a04c152) 7692 (+0) 7276 (+0) 94.59% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#163) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #163 +/- ##
=======================================
Coverage 93.39% 93.39%
=======================================
Files 49 49
Lines 6177 6177
=======================================
Hits 5769 5769
Misses 260 260
Partials 148 148 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Two small structure tidies from review.
1. One
internal/treeMoved the vendored jsonrepair runtime
lib/json/internal/jsonrepair→internal/jsonrepair. The repo now has a singleinternal/tree, so all vendored third-party code sits in one place — easier to find and to license-audit (matters as this goes open source). Trade-off: visibility widens from lib/json-only to module-wide — acceptable for a leaf utility with a single consumer (lib/json). Updates the import, thecodecov.yml/.codacy.ymlignore paths, and theCLAUDE.mdvendoring guidance (vendored code now documented as living under the top-levelinternal/).2. One fewer root test file
Folded the standalone
doc_coverage_test.go(1 test, 94 lines) intomodule_test.go, whose theme is exactly the builtin-module registry and its metadata.TestDocCoverage+ itslibReadmeDir/moduleSurfacehelpers now sit besideTestListBuiltinModules/TestModuleCapabilities.Verification
No behavior change.
go.sumunchanged (jsonrepair stays zero-dependency);make doc-checkstill 234/234;gofmt/vetclean;-race -count=2and the go1.19 floor (Docker) green.