INTL0001 when using records
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
issue の positional-record の例に照らして、INTL0001 ルールとその attribute-guideline の動作をレビューします。完了条件は、ガイダンスが record パラメーター上の inline attributes を明確に扱い、analyzer に期待される処理が文書化され、検証されていることです。
索引モデルが issue の本文から書いたものです。
説明
With the introduction of positional records it has become more valuable to apply attributes inline. This is especially true when dealing with serialization.
Consider the following which triggers INTL0001 (Properties must be on their own line)
public record MyDto([property:JsonPropertyName("my_Value")] string Value);
The work around is to simply do as the analyzer suggests and put it on its own line:
public record MyDto(
[property:JsonPropertyName("my_Value")]
string Value);
However, I would posit that this is less readable that the original.
We should revisit the attribute guidelines with these new use-cases in mind.
- 主要言語
- C#
- スター
- 12
- フォーク
- 16
- 平均マージ
- 2分
- マージ済み PR(30日)
- 10
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IntelliTect/CodingGuidelines のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
IntelliTect/CodingGuidelines#290 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
IntelliTect/CodingGuidelines#253 ·
メンテナーはふだん 1 日以内に返信
-
Review naming recommendation for fields再び着手できるかも @MarkMichaelis が 1321 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン.editorconfig C# coding guidelines proposal
IntelliTect/CodingGuidelines#249 · コメント 6 件 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
IntelliTect/CodingGuidelines#230 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
IntelliTect/CodingGuidelines#229 ·
メンテナーはふだん 1 日以内に返信
IntelliTect/CodingGuidelines の issue をすべて見る
似ている issue
-
[Simple] NavigationBar primary commands do not render AppBarButton.Content when it is a UIElementオープンcontrol/navigationbar kind/bug triage/untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
unoplatform/uno.toolkit.ui#1652 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/copilot-camp#1053 ·
メンテナーはふだん 1 日以内に返信
-
bug effort:S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
nightscout/nocturne#1861 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows area/Docs partner/agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/fluentui-blazor#5364 ·
メンテナーはふだん 1 日以内に返信