Pragmas before types and members get dropped when porting docs into triple slash comments
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp
- 領域
- documentation, tooling
調査の方向性
まず、issue 内の C# の例を再現します。pragma で囲まれた Foo 型と Utf8Formatter.Guid.cs も含めてください。宣言に対するドキュメントから triple-slash-comment への変換を追跡し、その変換によって周囲にあるすべての pragma 行が保持され、生成されたドキュメントコメントが追加されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
When porting API docs into triple slash comments, classes that have #if def pragmas wrapped around their access modifiers lose the first line of the pragma.
Given the following example, The #if USEPUBLIC pragma line is dropped.
#if USEPUBLIC
public
#else
internal
#endif
class Foo { }
Expected
/// <summary>Foo summary</summary>
#if USEPUBLIC
public
#else
internal
#endif
class Foo { }
Actual
/// <summary>Foo summary</summary>
public
#else
internal
#endif
class Foo { }
This occurs with other types of pragmas as well. An example from Utf8Formatter.Guid.cs shows a scenario of an #endregion getting dropped.
Before
namespace System.Buffers.Text
{
public static partial class Utf8Formatter
{
#region Constants
private const byte OpenBrace = (byte)'{';
private const byte CloseBrace = (byte)'}';
private const byte OpenParen = (byte)'(';
private const byte CloseParen = (byte)')';
private const byte Dash = (byte)'-';
#endregion Constants
/// <summary>
/// Formats a Guid as a UTF8 string.
/// </summary>
/// <param name="value">Value to format</param>
/// <param name="destination">Buffer to write the UTF8-formatted value to</param>
/// <param name="bytesWritten">Receives the length of the formatted text in bytes</param>
/// <param name="format">The standard format to use</param>
/// <returns>
/// true for success. "bytesWritten" contains the length of the formatted text in bytes.
/// false if buffer was too short. Iteratively increase the size of the buffer and retry until it succeeds.
/// </returns>
/// <remarks>
/// Formats supported:
/// D (default) nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn
/// B {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}
/// P (nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn)
/// N nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
/// </remarks>
/// <exceptions>
/// <cref>System.FormatException</cref> if the format is not valid for this data type.
/// </exceptions>
public static bool TryFormat(Guid value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
After
namespace System.Buffers.Text
{
/// <summary>Provides static methods to format common data types as Utf8 strings.</summary>
public static partial class Utf8Formatter
{
#region Constants
private const byte OpenBrace = (byte)'{';
private const byte CloseBrace = (byte)'}';
private const byte OpenParen = (byte)'(';
private const byte CloseParen = (byte)')';
private const byte Dash = (byte)'-';
/// <summary>Formats a <see cref="System.Guid" /> as a UTF8 string.</summary>
/// <param name="value">The value to format.</param>
/// <param name="destination">The buffer to write the UTF8-formatted value to.</param>
/// <param name="bytesWritten">When the method returns, contains the length of the formatted text in bytes.</param>
/// <param name="format">The standard format to use.</param>
/// <returns><see langword="true" /> if the formatting operation succeeds; <see langword="false" /> if <paramref name="buffer" /> is too small.</returns>
/// <remarks>Formats supported:
/// |Format string|Result string|
/// |--|--|
/// |D (default)|nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn|
/// |B|{nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}|
/// |P|(nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn)|
/// |N|nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn|
/// If the method fails, iteratively increase the size of the buffer and retry until it succeeds.</remarks>
public static bool TryFormat(Guid value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
- 主要言語
- C#
- スター
- 14
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/api-docs-sync のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
dotnet/api-docs-sync#182 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
dotnet/api-docs-sync#181 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
dotnet/api-docs-sync#180 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
dotnet/api-docs-sync#179 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
dotnet/api-docs-sync#178 · コメント 1 件 ·
dotnet/api-docs-sync の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PCL-Community/PCL-CE#3652 ·
メンテナーはふだん 1 日以内に返信
-
area:frontend bug FE P3
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
klasolsson81/jobbliggaren#2010 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
area: homeblaze type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
RicoSuter/Namotion.Interceptor#630 ·
メンテナーはふだん 1 日以内に返信
-
Akka.Hosting enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100