How to handle tool-specific magic comments
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- ruby
調査の方向性
この issue では実装ファイルもテストも指定されていません。RDoc で例を再現し、shebang と Ruby のマジックコメントの処理を追跡してから、# typed: true や # rbs_inline: enabled のようなツール固有のコメントと比較してください。これらのコメントがトップレベルのドキュメントとして表示されなくなり、RDoc の既存のマジックコメントの動作を壊していなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
rdoc currently removes shebangs and ruby magic comments from rendered documetantion.
But other tools like sorbet and rbs-inline provide their own comments like # typed: true or rbs_inline: enabled which aren't excluded. If I have a file like this:
# frozen_string_literal: true
# rbs_inline: enabled
# :markup: markdown
module Prism
module Foo
# ...
end
end
Then for each file, you get one rbs_inline comment on the top-level namespace. I feel like either rdoc should
- ignore any magic-style comment, regardless of if it is "official" or not
- Not attach comments where there is whitespace before the top-level. I guess this is not feasable for backwards compat since rdoc itself makes heavy use of that style.
This can be worked around by inserting #-- before the magic comments but I don't think I should need to care about this at all.
- 主要言語
- Ruby
- スター
- 927
- フォーク
- 467
- 平均マージ
- 23時間 47分
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/rdoc のほかの issue
-
RDoc 8.0.0 gem omits `doc/rdoc/example.rb`, which is referenced by the packaged markup documentation対応中かも @OskarEichler が 44 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Regexp generated from unescaped input in #expand_class対応中かも @jaynetics が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Wrong heading levels in generated HTML?対応中かも @st0012 が 9 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 8 日以内に返信
-
bug: "Conversation information" accordion renders blank with 0px height when conversation has no attributes対応中かも @gihovani が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
`hanami generate repository` would be a nice alias for `hanami generate repo`対応中かも @sandbergja が今日担当しました。 オープンbug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
hanami/hanami-cli#455 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
asciidoctor/asciidoctor#4882 · コメント 4 件 ·