rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

rdoc ignores --root option when generating ri documentation

Open rovf opened this issue 10 years ago • 1 comments

I'm at the root of my project tree:

$ ls
bin  gem  lib  rdocs  test  vp.rb

I want to generate only the docs for the lib directory, ignoring the rest:

$ rm -r rdocs/ri
$ rdoc --root=lib --format=ri --op=rdocs/ri
Parsing sources...
100% [15/15]  vp.rb

Generating RI format into /home/FISRONA/gitwrk/vp5/rdocs/ri...

 Files:      15

Classes:     1 ( 1 undocumented)
Modules:     1 ( 0 undocumented)
Constants:   5 ( 3 undocumented)
Attributes:  1 ( 0 undocumented)
Methods:    18 ( 6 undocumented)

Total:      26 (10 undocumented)
 61.54% documented

Elapsed: 0.5s

From this output, we can already see that rdoc also parses vp.rb, which is in the working directory, and NOT in the directory specified by the --root option. Indeed, inspecting the genereated directory rdocs/ri, I can see that it also has parsed the files in the directory 'test' (for instance).

rdoc 4.2.0 (Cygwin)

rovf avatar Jul 31 '15 12:07 rovf

This sounds like it could be a bug in ri, but i'll have to look into it.

As a work around, for now, you could try using the .document file to specify which files you want to source.

zzak avatar Dec 22 '15 08:12 zzak