Don't include method documentation for aliased methods

Open
#1,533 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
documentation

Research direction

Start with the documentation guide section linked in the issue, then reproduce the generated Array#find and Array#detect documentation to understand the alias behavior. Inspect RDoc's handling of aliased methods and determine how an optional suppression mode should work. Done means aliases no longer produce misleading duplicate documentation while the original method remains documented.

Written by the indexing model from the issue text.

Description

In Ruby, the documentation guide states:

Omit aliases from the call-seq, unless the alias is an operator method.

This is intended prevent documentation duplication and have the reader read the documentation for the original method. However, this leads to all of the aliases to not have call-seq so the method appears to accept no arguments and is misleading to the reader (e.g. Array#find and the alias Array#detect appears to take no arguments).

I think RDoc should (at least have the option to) avoid generating documentation for aliased methods.

(This discussion originated from https://github.com/ruby/ruby/pull/15756)

Dominant language
Ruby
Stars
930
Forks
472
Avg merge
2d 8h
Merged PRs (30d)
12

Getting set up

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.

More from ruby/rdoc

All issues in ruby/rdoc

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.