Skip to content

[refactor] consolidate vendored code under internal/; fold doc-coverage into module_test#163

Merged
vt128 merged 1 commit into
masterfrom
test-tidy
Jun 13, 2026
Merged

[refactor] consolidate vendored code under internal/; fold doc-coverage into module_test#163
vt128 merged 1 commit into
masterfrom
test-tidy

Conversation

@vt128

@vt128 vt128 commented Jun 13, 2026

Copy link
Copy Markdown
Member

Two small structure tidies from review.

1. One internal/ tree

Moved the vendored jsonrepair runtime lib/json/internal/jsonrepairinternal/jsonrepair. The repo now has a single internal/ 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, the codecov.yml/.codacy.yml ignore paths, and the CLAUDE.md vendoring guidance (vendored code now documented as living under the top-level internal/).

2. One fewer root test file

Folded the standalone doc_coverage_test.go (1 test, 94 lines) into module_test.go, whose theme is exactly the builtin-module registry and its metadata. TestDocCoverage + its libReadmeDir/moduleSurface helpers now sit beside TestListBuiltinModules / TestModuleCapabilities.

Verification

No behavior change. go.sum unchanged (jsonrepair stays zero-dependency); make doc-check still 234/234; gofmt/vet clean; -race -count=2 and the go1.19 floor (Docker) green.

…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>
@codacy-production

codacy-production Bot commented Jun 13, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 19 complexity · 0 duplication

Metric Results
Complexity 19
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

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

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.39%. Comparing base (2e6daea) to head (a04c152).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vt128 vt128 merged commit 433eae0 into master Jun 13, 2026
12 checks passed
@vt128 vt128 deleted the test-tidy branch June 13, 2026 03:51
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.

1 participant