From 5af4079f5fd39102bb4fd05993580e5269c9a410 Mon Sep 17 00:00:00 2001 From: "Michael C. Fanning" Date: Wed, 16 Jan 2019 15:44:45 -0800 Subject: [PATCH] Fix Sarif.Driver and Sarif.Functional tests. (#1217) * Fix Sarif.Driver and Sarif.Functional tests. * Restore test file --- src/Sarif.Converters/AndroidStudioConverter.cs | 4 ++-- src/Sarif.Driver.UnitTests/SimpleTestRule.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sarif.Converters/AndroidStudioConverter.cs b/src/Sarif.Converters/AndroidStudioConverter.cs index 05a47ad92..7e9df56b8 100644 --- a/src/Sarif.Converters/AndroidStudioConverter.cs +++ b/src/Sarif.Converters/AndroidStudioConverter.cs @@ -82,7 +82,7 @@ public override void Convert(Stream input, IResultLogWriter output, OptionallyEm /// private IList ProcessAndroidStudioLog(XmlReader xmlReader) { - var results = new List(); + var results = new HashSet(Result.ValueComparer); int problemsDepth = xmlReader.Depth; xmlReader.ReadStartElement(_strings.Problems); @@ -98,7 +98,7 @@ private IList ProcessAndroidStudioLog(XmlReader xmlReader) xmlReader.ReadEndElement(); // - return results; + return new List(results); } public Result ConvertProblemToSarifResult(AndroidStudioProblem problem) diff --git a/src/Sarif.Driver.UnitTests/SimpleTestRule.cs b/src/Sarif.Driver.UnitTests/SimpleTestRule.cs index 7ca4d6c90..5cb37c3e8 100644 --- a/src/Sarif.Driver.UnitTests/SimpleTestRule.cs +++ b/src/Sarif.Driver.UnitTests/SimpleTestRule.cs @@ -12,7 +12,7 @@ namespace Microsoft.CodeAnalysis.Sarif [Export(typeof(IRule)), Export(typeof(IOptionsProvider)), Export(typeof(ISkimmer))] internal class SimpleTestRule : TestRuleBase, IOptionsProvider { - public new string Id => "TEST002"; + public override string Id => "TEST002"; public override Message FullDescription { get { return new Message { Text = String.Empty }; } }