ruby / ruby/rdoc

RDoc formatter hardcoded to darkfish for RubyGems

Open
#653 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It seems that RDoc is not currently designed to allow a custom formatter when running gem rdoc. Even when using .gemrc and setting the --format option to a custom formatter (like horo) seems to not work. In fact, in the latest version of RDoc (6.0.4), any attempt to use a custom formatter via .gemrc causes a crash:

$ gem rdoc --rdoc --overwrite rake
Parsing documentation for rake-12.3.1
Installing ri documentation for rake-12.3.1
ERROR:  While executing gem ... (TypeError)
    no implicit conversion of nil into String

My .gemrc file:

rdoc: -f horo

I traced the TypeError exception to here: https://github.com/ruby/rdoc/blob/master/lib/rdoc/generator/darkfish.rb#L167

Thanks in advance.

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 failure reported at lib/rdoc/generator/darkfish.rb line 167 and reproduce it by running gem rdoc --rdoc --overwrite rake with .gemrc configured as rdoc: -f horo. Trace how the custom formatter option reaches RDoc, then verify that gem rdoc accepts the formatter without the reported TypeError and uses the requested formatter.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
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.