diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs b/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs index 3855428a5ae9..f243bdb54013 100644 --- a/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs +++ b/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs @@ -203,6 +203,8 @@ internal class TestDiagnosticWriter : IDiagnosticsWriter public IList Diagnostics { get; } = new List(); public void AddEntry(DiagnosticMessage message) => this.Diagnostics.Add(message); + + public void Dispose() { } } /// diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs index 2b00d9db742a..3288eb5e852e 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs @@ -218,6 +218,8 @@ internal class TestDiagnosticWriter : IDiagnosticsWriter public IList Diagnostics { get; } = new List(); public void AddEntry(DiagnosticMessage message) => this.Diagnostics.Add(message); + + public void Dispose() { } } /// diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs index 6fe258abc0e3..2414791ad4ce 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs @@ -361,7 +361,7 @@ protected virtual void Dispose(bool disposing) { if (disposing) { - (diagnostics as IDisposable)?.Dispose(); + diagnostics.Dispose(); } } diff --git a/csharp/extractor/Semmle.Util/ToolStatusPage.cs b/csharp/extractor/Semmle.Util/ToolStatusPage.cs index 1be700654af2..a93cdec5fdf6 100644 --- a/csharp/extractor/Semmle.Util/ToolStatusPage.cs +++ b/csharp/extractor/Semmle.Util/ToolStatusPage.cs @@ -183,7 +183,7 @@ public DiagnosticMessage( /// /// Provides the ability to write diagnostic messages to some output. /// - public interface IDiagnosticsWriter + public interface IDiagnosticsWriter : IDisposable { /// /// Adds as a new diagnostics entry.