How can I list the undocumented modules/classes/constants/methods with yardoc?
Asked Answered
A

2

45

I have a small library of code that I am documenting with YARD. When I run the yardoc command, it tells me:

Files:          40
Modules:        14 (    0 undocumented)
Classes:        39 (    0 undocumented)
Constants:      21 (    4 undocumented)
Methods:       239 (   31 undocumented)
 88.82% documented

Instead of wading through all of my code to find the undocumented constants and methods, I want it to simply list the undocumented items. Anybody know how to do this?

Adjoint answered 22/4, 2011 at 15:21 Comment(0)
B
51

You can specifically list all undocumented objects (and their file locations) with the --list-undoc option.

yard stats --list-undoc

or even

yard --list-undoc
Boutis answered 22/4, 2011 at 16:0 Comment(3)
Nice! That option wasn't listed in the --help output, and when I used it, yardoc said [warn]: Unrecognized/invalid option: --list-undoc -- but it worked anyway. Thanks!Adjoint
This should not be the accepted answer. @Asher's is more correct.Scabrous
Thanks, I've update the answer. But, Jeff, feel free to re-accept the answer if you want.Boutis
P
27

This confused me as well. The --list-undoc option is actually defined under the stats command. Also, the command is yard rather than yardoc, which is shorthand for yard doc.

yard stats --list-undoc
Paderna answered 21/5, 2011 at 2:34 Comment(1)
For reference, it's actually "yard stats --list-undoc" rather than yardoc.Haggerty

© 2022 - 2024 — McMap. All rights reserved.