ruby / ruby/rdoc

rdoc ignores --root option when generating ri documentation

Open
#358 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rdoc command and reproduce the reported rdoc 4.2.0 invocation using --root=lib, --format=ri, and --op=rdocs/ri. Compare the parsed files with the project tree, especially vp.rb and test; done means only documentation from lib is generated.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.