diff --git a/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/ReleaseTrackingAnalyzerTests.cs b/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/ReleaseTrackingAnalyzerTests.cs index 7fdf967dcf..a0ee88553e 100644 --- a/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/ReleaseTrackingAnalyzerTests.cs +++ b/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/ReleaseTrackingAnalyzerTests.cs @@ -56,7 +56,7 @@ public override void Initialize(AnalysisContext context) {{ }} await VerifyCSharpAsync(source, shippedText, unshippedText); } - [WindowsOnlyFact] + [Fact] public async Task TestCodeFixToEnableAnalyzerReleaseTracking() { var source = @" diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs index 6af734dcb6..4a4102b4eb 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs @@ -335,8 +335,7 @@ private static string FormatLiteralValues(IEnumerable literalValues) { // sanitize the literal to ensure it's not multi-line // replace any newline characters with a space - var sanitizedLiteral = literal.Replace(Environment.NewLine, " "); - sanitizedLiteral = sanitizedLiteral.Replace((char)13, ' '); + var sanitizedLiteral = literal.Replace((char)13, ' '); sanitizedLiteral = sanitizedLiteral.Replace((char)10, ' '); if (literals.Length > 0) diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParametersTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParametersTests.cs index ff1803cde0..626e7da123 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParametersTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParametersTests.cs @@ -183,7 +183,7 @@ End Class "); } - [WindowsOnlyFact] + [Fact] public async Task ParameterWithLocalizableAttribute_MultipleLineStringLiteralArgument_Method_Diagnostic() { await VerifyCS.VerifyAnalyzerAsync(@" @@ -206,7 +206,7 @@ public void M1(C c) } ".NormalizeLineEndings(), // Test0.cs(16,13): warning CA1303: Method 'void Test.M1(C c)' passes a literal string as parameter 'param' of a call to 'void C.M(string param)'. Retrieve the following string(s) from a resource table instead: "a a". - GetCSharpResultAt(16, 13, "void Test.M1(C c)", "param", "void C.M(string param)", "a a")); + GetCSharpResultAt(16, 13, "void Test.M1(C c)", "param", "void C.M(string param)", "a a")); await VerifyVB.VerifyAnalyzerAsync(@" Imports Microsoft.VisualBasic @@ -225,7 +225,7 @@ End Sub End Class ".NormalizeLineEndings(), // Test0.vb(13,13): warning CA1303: Method 'Sub Test.M1(c As C)' passes a literal string as parameter 'param' of a call to 'Sub C.M(param As String)'. Retrieve the following string(s) from a resource table instead: "a a". - GetBasicResultAt(13, 13, "Sub Test.M1(c As C)", "param", "Sub C.M(param As String)", "a a")); + GetBasicResultAt(13, 13, "Sub Test.M1(c As C)", "param", "Sub C.M(param As String)", "a a")); } [Fact] @@ -1793,7 +1793,7 @@ public void M1() await csharpTest.RunAsync(); } - [WindowsOnlyTheory] + [Theory] [InlineData(null)] [InlineData(PointsToAnalysisKind.None)] [InlineData(PointsToAnalysisKind.PartialWithoutTrackingFieldsAndProperties)] @@ -1834,7 +1834,7 @@ public void M1(C c) { csTest.ExpectedDiagnostics.Add( // Test0.cs(17,13): warning CA1303: Method 'void Test.M1(C c)' passes a literal string as parameter 'param' of a call to 'void C.M(string param)'. Retrieve the following string(s) from a resource table instead: "a a". - GetCSharpResultAt(17, 13, "void Test.M1(C c)", "param", "void C.M(string param)", "a a")); + GetCSharpResultAt(17, 13, "void Test.M1(C c)", "param", "void C.M(string param)", "a a")); } await csTest.RunAsync(); @@ -1866,7 +1866,7 @@ End Class { vbTest.ExpectedDiagnostics.Add( // Test0.vb(14,13): warning CA1303: Method 'Sub Test.M1(c As C)' passes a literal string as parameter 'param' of a call to 'Sub C.M(param As String)'. Retrieve the following string(s) from a resource table instead: "a a". - GetBasicResultAt(14, 13, "Sub Test.M1(c As C)", "param", "Sub C.M(param As String)", "a a")); + GetBasicResultAt(14, 13, "Sub Test.M1(c As C)", "param", "Sub C.M(param As String)", "a a")); } await vbTest.RunAsync();