Don't include method documentation for aliased methods

未關閉
#1,533 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
42/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
ruby
領域
documentation

研究方向

先從 issue 中連結的文件指南章節開始,接著重新產生 Array#find 和 Array#detect 的文件,以了解 alias 的行為。檢查 RDoc 如何處理 aliased methods,並判斷可選的 suppression mode 應如何運作。當 alias 不再產生容易誤導的重複文件,同時原始方法仍保留文件時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

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)

主要語言
Ruby
星號
930
分支
472
平均合併
2 天 8 小時
30 天內合併 PR
12

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ruby/rdoc 的其他 Issue

查看 ruby/rdoc 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。