如何用yardoc列出未文档化的模块/类/常量/方法?

时间:2022-06-07 22:56:36

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

我有一个小的代码库,我正在用YARD记录。当我运行yardoc命令时,它告诉我:

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?

与其费力地遍历我所有的代码来查找未文档化的常量和方法,我希望它只列出未文档化的项。有人知道怎么做吗?

2 个解决方案

#1


42  

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

您可以使用-list-undoc选项专门列出所有未归档的对象(及其文件位置)。

yard stats --list-undoc

or even

甚至

yard --list-undoc

#2


25  

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.

这也让我困惑。list-undoc选项实际上是在stats命令下定义的。此外,命令是yard而不是yardoc,这是yard doc的简写。

yard stats --list-undoc

#1


42  

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

您可以使用-list-undoc选项专门列出所有未归档的对象(及其文件位置)。

yard stats --list-undoc

or even

甚至

yard --list-undoc

#2


25  

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.

这也让我困惑。list-undoc选项实际上是在stats命令下定义的。此外,命令是yard而不是yardoc,这是yard doc的简写。

yard stats --list-undoc