Skip to content

docs: add .yardopts so yard and rake doc agree - #48

Merged
tas50 merged 1 commit into
mainfrom
fix/add-yardopts
Aug 23, 2026
Merged

docs: add .yardopts so yard and rake doc agree#48
tas50 merged 1 commit into
mainfrom
fix/add-yardopts

Conversation

@tas50

@tas50 tas50 commented Aug 23, 2026

Copy link
Copy Markdown
Member

What

The YARD options lived only in the Rakefile's YardocTask, so a bare yard from the command line produced different documentation than rake doc:

  • the Rakefile passed --no-private, a plain yard did not
  • neither had a --readme, a --title, or an extra-file list

This adds .yardopts as the single source of truth and lets the YardocTask pick it up, matching the other test-kitchen drivers. The redundant lib/**/*.rb glob is dropped from :doc_coverage so that task reads .yardopts too.

Note on --private

Switching from --no-private to --private/--protected widens the surface YARD reports on from 9 methods to 23. All 23 are already documented, so coverage stays at 100% — this just stops hiding two thirds of the driver from the generated docs.

Verification

yard and yard stats --list-undoc now return identical output:

Files:           2
Modules:         2 (    0 undocumented)
Classes:         1 (    0 undocumented)
Constants:      10 (    0 undocumented)
Attributes:      0 (    0 undocumented)
Methods:        23 (    0 undocumented)
 100.00% documented

rake -T still lists both tasks:

rake doc              # Generate YARD Documentation
rake doc_coverage     # List anything in lib/ that is still undocumented

Docs-only change — no lib/ or spec/ files touched.

🤖 Generated with Claude Code

The YARD options lived only in the Rakefile's YardocTask, so a bare `yard`
from the command line produced different documentation than `rake doc`:
the Rakefile passed --no-private, a plain `yard` did not, and neither had
a --readme, --title, or extra-file list.

Move the options into .yardopts as the single source of truth and let the
YardocTask pick them up, matching the other test-kitchen drivers. Also
drop the redundant file glob from :doc_coverage so it reads .yardopts too.

Switching from --no-private to --private/--protected widens the surface
YARD reports on from 9 methods to 23. All 23 are documented, so coverage
stays at 100%.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tas50
tas50 merged commit 3d59bdf into main Aug 23, 2026
8 checks passed
@tas50
tas50 deleted the fix/add-yardopts branch August 23, 2026 05:08
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