ruby / ruby/rdoc

Commandline option -f doesn't override RDOCOPT's value

Open
#62 2 comments 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

Hi there,

RDoc's help states this:

    Options can be specified via the RDOCOPT environment variable, which
    functions similar to the RUBYOPT environment variable for ruby.

      $ export RDOCOPT="--show-hash"

    will make rdoc show hashes in method links by default.  Command-line options
    always will override those in RDOCOPT.

However, this is not true for the -f commandline option as can be seen in this gist (the interesting part is the last execution of RDoc where I set RDOCOPT to -f hanna and request darkfish via rdoc -f darkfish.

Instead of RDoc using darkfish instead of RDOCOPT's hanna, RDoc states this:

    invalid options: -f generator already set to hanna
    (invalid options are ignored)

and continues to use the hanna generator.

ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
rdoc --version: rdoc 3.9.2
OS: Arch Linux

Valete,
Marvin

PS: Shouldn't the --formatter option be named --generator? darkfish, hanna, and all those are generators rather than formatters.

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 by reproducing the final command from the linked gist with RDOCOPT set to -f hanna and the command requesting darkfish. Trace RDoc's command-line option handling to determine why -f is rejected, then verify that the command-line generator takes precedence and that the option naming concern is addressed or documented.

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.