diff --git a/src/Buildalyzer.Workspaces/Buildalyzer.Workspaces.csproj b/src/Buildalyzer.Workspaces/Buildalyzer.Workspaces.csproj index c79d76a0..2d0cd377 100644 --- a/src/Buildalyzer.Workspaces/Buildalyzer.Workspaces.csproj +++ b/src/Buildalyzer.Workspaces/Buildalyzer.Workspaces.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/tests/Buildalyzer.Tests/AnalyzerResultFixture.cs b/tests/Buildalyzer.Tests/AnalyzerResultFixture.cs index d86a4e9f..90ca2d39 100644 --- a/tests/Buildalyzer.Tests/AnalyzerResultFixture.cs +++ b/tests/Buildalyzer.Tests/AnalyzerResultFixture.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Text; @@ -53,6 +54,7 @@ public void ParsesCscCommandLineSourceFiles(string commandLine, string[] sourceF [TestCase("foo.cs bar.cs csc.dll", new[] { "foo.cs", "bar.cs" })] [TestCase("foo.cs csc.exe bar.cs", new[] { "foo.cs", "bar.cs" })] [TestCase("foo.cs bar.cs", new[] { "foo.cs", "bar.cs" })] + [SuppressMessage("CA1062", "CA1062:Validate arguments of public methods", Justification = "Test")] public void RemovesCscAssembliesFromSourceFiles(string input, string[] sourceFiles) { // Given @@ -95,6 +97,7 @@ public void ParsesCscCommandLineWithAliasReference() [TestCase("C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\MSBuild\\Current\\Bin\\Roslyn\\csc.exe /noconfig")] [TestCase("/one two/three/csc.dll /noconfig")] + [SuppressMessage("CA1062", "CA1062:Validate arguments of public methods", Justification = "Test")] public void TreatsCscCommandAsSingleArg(string commandLine) { // Given, When @@ -205,7 +208,7 @@ public void ParseVbcCommandLineWithMultipleReferences() result.ProcessVbcCommandLine(commandLine); // Then - result.References.Count().ShouldBe(2); + result.References.Length.ShouldBe(2); } } }