ruby / ruby/rdoc

rdoc -C1 reports alias method arguments as uncovered

Open
#1,567 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

# run this with rdoc -C  rdoc_bug.rb and it looks fully covered.
# run this with rdoc -C1 rdoc_bug.rb to see that aliases arguments aren't covered.

##
# Instance methods

module InstanceMethods
  ##
  # Takes a +value+ or a +block+ and returns a value monad.

  def _ value = nil, &block
    # ...
  end

  alias value  _
  alias expect _
end

reports:

The following items are not documented:

  module InstanceMethods # is documented

    # in file rdoc_bug.rb
    # +value+, +block+ is not documented
    def expect(value = nil, &block); end

    # in file rdoc_bug.rb
    # +value+, +block+ is not documented
    def value(value = nil, &block); end

  end

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 report with rdoc -C and rdoc -C1 on the shown rdoc_bug.rb example, then trace how RDoc handles the aliased methods value and expect. Done means the -C1 report no longer incorrectly marks the aliases' value and block arguments as undocumented.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.