commandlineparser / commandlineparser/commandline
VerbAttribute violates CS3016 code inspection
- 主要言語
- C#
- スター
- 4.8k
- フォーク
- 478
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**Describe the bug**
VerbAttribute current accepts a string array for aliases, making it non-compliant with CLS standards.
**To Reproduce**
* Create a solution targeting .NET Framework 4.8
* Create a project which targets .NET Framework 4.8 AND .NET Standard 2.1: `net48;netstandard2.1`
* Create a class which uses a Verb attribute (in either project) such as:
```
[Verb("MyVerb", HelpText = "MyVerb HelpText")]
public class MyClassWithVerb { }
```
**Expected behavior**
No code analysis/compiler warnings.
**Additional context**
The following code analysis compiler warning is received when using `VerbAttribute`:
```
Severity Code Description Project File Line Suppression State
Warning CS3016 Arrays as attribute arguments is not CLS-compliant MyProject C:\Path\To\Source\MyClass.cs 14 Active
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず VerbAttribute を見つけ、属性宣言でそのエイリアスがどのように表現されているかを確認します。issue に記載された .NET Framework 4.8 および .NET Standard 2.1 のターゲットで CS3016 警告を再現します。完了条件は、VerbAttribute が文書化された使用方法を引き続きサポートしながら、サンプルで CLS 警告が発生しないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100