From bac175cd01c2ea183535a38fc1d81b7cf512ce6e Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sun, 3 May 2015 01:38:30 -0700 Subject: [PATCH] Set warningsAsErrors to true and fixed warnings --- src/OmniSharp.Stdio/project.json | 3 +++ src/OmniSharp/project.json | 3 +++ tests/OmniSharp.Stdio.Tests/project.json | 3 +++ tests/OmniSharp.Tests/BufferManagerFacts.cs | 9 ++++----- tests/OmniSharp.Tests/DocumentationConverterFacts.cs | 2 +- tests/OmniSharp.Tests/project.json | 3 +++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/OmniSharp.Stdio/project.json b/src/OmniSharp.Stdio/project.json index 668aa17196..c0fb5ea8d0 100644 --- a/src/OmniSharp.Stdio/project.json +++ b/src/OmniSharp.Stdio/project.json @@ -1,6 +1,9 @@ { "version": "1.0.0-*", "description": "ASP.NET 5 web server for stdio", + "compilationOptions": { + "warningsAsErrors": true + }, "dependencies": { "Microsoft.AspNet.Hosting": "1.0.0-beta3", "Microsoft.AspNet.Http.Interfaces": "1.0.0-beta3", diff --git a/src/OmniSharp/project.json b/src/OmniSharp/project.json index a7ac0b3869..ab89ae1e27 100644 --- a/src/OmniSharp/project.json +++ b/src/OmniSharp/project.json @@ -1,5 +1,8 @@ { "version": "1.0.0-*", + "compilationOptions": { + "warningsAsErrors": true + }, "dependencies": { "OmniSharp.Stdio": "1.0.0-*", "Kestrel": "1.0.0-beta3", diff --git a/tests/OmniSharp.Stdio.Tests/project.json b/tests/OmniSharp.Stdio.Tests/project.json index 78488a4f5b..5a6d193079 100644 --- a/tests/OmniSharp.Stdio.Tests/project.json +++ b/tests/OmniSharp.Stdio.Tests/project.json @@ -1,5 +1,8 @@ { "version": "1.0.0-*", + "compilationOptions": { + "warningsAsErrors": true + }, "dependencies": { "OmniSharp.Stdio": "1.0.0-*", "xunit": "2.1.0-beta1-*", diff --git a/tests/OmniSharp.Tests/BufferManagerFacts.cs b/tests/OmniSharp.Tests/BufferManagerFacts.cs index 8f2477cbd0..9d628165d7 100644 --- a/tests/OmniSharp.Tests/BufferManagerFacts.cs +++ b/tests/OmniSharp.Tests/BufferManagerFacts.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Threading.Tasks; using OmniSharp.Models; using Xunit; @@ -10,7 +9,7 @@ namespace OmniSharp.Tests public class BufferManagerFacts { [Fact] - public async Task UpdateBufferIgnoresVoidRequests() + public void UpdateBufferIgnoresVoidRequests() { var workspace = TestHelpers.CreateSimpleWorkspace("class C {}", "test.cs"); Assert.Equal(2, workspace.CurrentSolution.Projects.Count()); @@ -29,7 +28,7 @@ public async Task UpdateBufferIgnoresVoidRequests() } [Fact] - public async Task UpdateBufferIgnoresFilePathsThatDontMatchAProjectPath() + public void UpdateBufferIgnoresFilePathsThatDontMatchAProjectPath() { var workspace = GetWorkspaceWithProjects(); @@ -39,7 +38,7 @@ public async Task UpdateBufferIgnoresFilePathsThatDontMatchAProjectPath() } [Fact] - public async Task UpdateBufferFindsProjectBasedOnPath() + public void UpdateBufferFindsProjectBasedOnPath() { var workspace = GetWorkspaceWithProjects(); @@ -54,7 +53,7 @@ public async Task UpdateBufferFindsProjectBasedOnPath() } [Fact] - public async Task UpdateBufferFindsProjectBasedOnNearestPath() + public void UpdateBufferFindsProjectBasedOnNearestPath() { var workspace = new OmnisharpWorkspace(); diff --git a/tests/OmniSharp.Tests/DocumentationConverterFacts.cs b/tests/OmniSharp.Tests/DocumentationConverterFacts.cs index c110c6f8d4..b8444fef92 100644 --- a/tests/OmniSharp.Tests/DocumentationConverterFacts.cs +++ b/tests/OmniSharp.Tests/DocumentationConverterFacts.cs @@ -7,7 +7,7 @@ namespace OmniSharp.Tests public class DocumentationConverterFacts { [Fact] - public async Task Converts_xml_documentation_to_plain_text() + public void Converts_xml_documentation_to_plain_text() { var documentation = @" diff --git a/tests/OmniSharp.Tests/project.json b/tests/OmniSharp.Tests/project.json index 72f5e03d31..f63db82fb3 100644 --- a/tests/OmniSharp.Tests/project.json +++ b/tests/OmniSharp.Tests/project.json @@ -1,5 +1,8 @@ { "version": "1.0.0-*", + "compilationOptions": { + "warningsAsErrors": true + }, "dependencies": { "OmniSharp": "1.0.0-*", "xunit": "2.1.0-beta1-*",