From 5f0e8db3ab639ac1e2055843baee3b1a6a5708fa Mon Sep 17 00:00:00 2001 From: jnm2 Date: Tue, 30 Jul 2019 21:05:16 -0400 Subject: [PATCH] Fixed trailing whitespace in generated GlobalSuppressions.cs --- .../SuppressionTest_FixAllTests.cs | 20 ++--- .../Suppression/SuppressionTests.cs | 76 +++++++++---------- .../Suppression/SuppressionTests.vb | 60 +++++++-------- .../AbstractSuppressionCodeFixProvider.cs | 4 +- 4 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs b/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs index 1e24cbb377e..4ee1a6fdc1e 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs +++ b/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs @@ -368,9 +368,9 @@ class Class2 "; var addedGlobalSuppressions = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:Class1.Method~System.Int32"")] @@ -471,9 +471,9 @@ class Class2 "; var addedGlobalSuppressions = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:Class1.Method~System.Int32"")] @@ -575,9 +575,9 @@ class Class2 "; var addedGlobalSuppressionsProject1 = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:Class1.Method~System.Int32"")] @@ -588,9 +588,9 @@ class Class2 ".Replace("<", "<").Replace(">", ">"); var addedGlobalSuppressionsProject2 = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:Class1.Method~System.Int32"")] @@ -698,9 +698,9 @@ class Class2 "; var addedGlobalSuppressions = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""NoLocationDiagnostic"", ""NoLocationDiagnostic:NoLocationDiagnostic"", Justification = ""{FeaturesResources.Pending}"")]" diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs b/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs index 5e444eece62..a5ad9d1851c 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs +++ b/src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs @@ -853,9 +853,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""type"", Target = ""~T:Class"")] @@ -896,9 +896,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""namespace"", Target = ""~N:N"")] @@ -945,9 +945,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""type"", Target = ""~T:N1.N2.Class"")] @@ -997,9 +997,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""type"", Target = ""~T:N.Generic`1.Class"")] @@ -1049,9 +1049,9 @@ class Class } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:N.Generic`1.Class.Method~System.Int32"")] @@ -1106,9 +1106,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:N.Generic`1.Class.Method(System.Int32,System.Char@)~System.Int32"")] @@ -1166,9 +1166,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:N.Generic`1.Class.Method~System.Int32"")] @@ -1197,9 +1197,9 @@ class Class } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~M:N.Generic`1.Class.Method``1(``0)~System.Int32"")] @@ -1249,9 +1249,9 @@ class Class } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~P:N.Generic.Class.Property"")] @@ -1292,9 +1292,9 @@ class Class [|int field = 0;|] }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~F:Class.field"")] @@ -1334,9 +1334,9 @@ enum E |] }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""type"", Target = ""~T:E"")] @@ -1371,9 +1371,9 @@ class Class int [|field = 0|], field2 = 1; }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~F:Class.field"")] @@ -1419,9 +1419,9 @@ class Class }|] }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""member"", Target = ""~E:Class.SampleEvent"")] @@ -1469,9 +1469,9 @@ class Class { } ]]> "", Scope = ""type"", Target = ""Class"")] @@ -1481,9 +1481,9 @@ class Class { } "; var expectedText = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = """", Scope = ""type"", Target = ""Class"")] @@ -1518,9 +1518,9 @@ class Class { } "; var expectedText = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""type"", Target = ""~T:Class2"")] @@ -1551,9 +1551,9 @@ class Class { } ]]> "", Scope = ""type"", Target = ""Class"")] @@ -1563,9 +1563,9 @@ class Class { } "; var expectedText = $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = """", Scope = ""type"", Target = ""Class"")] @@ -1969,9 +1969,9 @@ int Method() } }", $@" -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""NoLocationDiagnostic"", ""NoLocationDiagnostic:NoLocationDiagnostic"", Justification = ""{FeaturesResources.Pending}"")] diff --git a/src/EditorFeatures/VisualBasicTest/Diagnostics/Suppression/SuppressionTests.vb b/src/EditorFeatures/VisualBasicTest/Diagnostics/Suppression/SuppressionTests.vb index afd3409c02c..660e4e6dbc5 100644 --- a/src/EditorFeatures/VisualBasicTest/Diagnostics/Suppression/SuppressionTests.vb +++ b/src/EditorFeatures/VisualBasicTest/Diagnostics/Suppression/SuppressionTests.vb @@ -981,9 +981,9 @@ Imports System End Sub End Class]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1019,9 +1019,9 @@ Imports System End Class End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1061,9 +1061,9 @@ Namespace N1 End Namespace End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1105,9 +1105,9 @@ Namespace N End Class End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1149,9 +1149,9 @@ Namespace N End Class End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1197,9 +1197,9 @@ Namespace N End Class End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1249,9 +1249,9 @@ Namespace N End Class End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1299,9 +1299,9 @@ Namespace N End Class End Namespace]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1339,9 +1339,9 @@ Class C [|Private ReadOnly F As Integer|] End Class]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1395,9 +1395,9 @@ Class C End Event End Class]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1457,9 +1457,9 @@ End Class End Class]]> ", Scope:="type", Target:="Class1")> @@ -1469,9 +1469,9 @@ End Class]]> Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. "", Scope:=""type"", Target:=""Class1"")> @@ -1506,9 +1506,9 @@ End Class Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. @@ -1539,9 +1539,9 @@ End Class ]]> ", Scope:="type", Target:="Class1")> @@ -1551,9 +1551,9 @@ End Class Dim expected = $" -' This file is used by Code Analysis to maintain SuppressMessage +' This file is used by Code Analysis to maintain SuppressMessage ' attributes that are applied to this project. -' Project-level suppressions either have no target or are given +' Project-level suppressions either have no target or are given ' a specific target and scoped to a namespace, type, member, etc. "", Scope:=""type"", Target:=""Class1"")> diff --git a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs index f2f59d33319..ddf69749830 100644 --- a/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs +++ b/src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs @@ -21,9 +21,9 @@ internal abstract partial class AbstractSuppressionCodeFixProvider : IConfigurat private const string s_globalSuppressionsFileName = "GlobalSuppressions"; private const string s_suppressionsFileCommentTemplate = @" -{0} This file is used by Code Analysis to maintain SuppressMessage +{0} This file is used by Code Analysis to maintain SuppressMessage {0} attributes that are applied to this project. -{0} Project-level suppressions either have no target or are given +{0} Project-level suppressions either have no target or are given {0} a specific target and scoped to a namespace, type, member, etc. "; -- GitLab