From a90d2ccc7f2bcdbf56cac31b0e05070c04854750 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 18:59:01 +0000 Subject: [PATCH] Suppress CA1019, false positive CA1019 wants us to expose the parameter as a property, but this value is concatenated to the aliases list which conglomerates all aliases - including the first parameter - into one list --- VpSharp.Commands/Attributes/AliasesAttribute.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VpSharp.Commands/Attributes/AliasesAttribute.cs b/VpSharp.Commands/Attributes/AliasesAttribute.cs index 57956c4..74fb4ec 100644 --- a/VpSharp.Commands/Attributes/AliasesAttribute.cs +++ b/VpSharp.Commands/Attributes/AliasesAttribute.cs @@ -1,4 +1,4 @@ -using System.Collections.ObjectModel; +using System.Collections.ObjectModel; namespace VpSharp.Commands.Attributes; @@ -23,7 +23,9 @@ public sealed class AliasesAttribute : Attribute /// -or- /// An element in is null, empty, or consists of only whitespace. /// +#pragma warning disable CA1019 public AliasesAttribute(string alias, params string[] aliases) +#pragma warning restore CA1019 { ArgumentNullException.ThrowIfNull(alias); ArgumentNullException.ThrowIfNull(aliases);