commandlineparser / commandlineparser/commandline

VerbAttribute violates CS3016 code inspection

未关闭
#927 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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