ruby / ruby/rdoc

RDoc formatter hardcoded to darkfish for RubyGems

未关闭
#653 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Ruby
星标
930
派生
465
平均合并
3 天 10 小时
30 天内合并 PR
27

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 lib/rdoc/generator/darkfish.rb 第 167 行报告的失败开始,通过在将 .gemrc 配置为 rdoc: -f horo 的情况下运行 gem rdoc --rdoc --overwrite rake 来复现该失败。跟踪自定义 formatter 选项如何传递到 RDoc,然后验证 gem rdoc 能够接受该 formatter,而不会出现报告的 TypeError,并使用所请求的 formatter。

由索引模型根据 Issue 内容生成。

评估

技术栈
ruby
领域
documentation
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。