Make nullable warnings a per file opt-in (#1842)

* Make nullable warnings a per file opt-in

* Remove unneeded compiler directives

* Remove compiler directive for User Data
This commit is contained in:
Karl Burtram
2023-02-03 18:10:07 -08:00
committed by GitHub
parent 735517a503
commit f288bee294
1020 changed files with 2299 additions and 273 deletions

View File

@@ -3,6 +3,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.Data.SqlClient;

View File

@@ -3,6 +3,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.Data.SqlClient;
@@ -317,11 +319,11 @@ namespace Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.TSQLExecutionEn
public void ExecutionEngineTest_HaltOnError()
{
string sqlStatement = "select * from authors\n go\n select * from sysbojects \n go \n";
ExecutionEngineConditions conditions = new ExecutionEngineConditions
{
IsTransactionWrapped = true,
IsParseOnly = false,
IsHaltOnError = true
ExecutionEngineConditions conditions = new ExecutionEngineConditions
{
IsTransactionWrapped = true,
IsParseOnly = false,
IsHaltOnError = true
};
TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions);

View File

@@ -3,13 +3,15 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.Data.SqlClient;
using System.Threading;
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
using Microsoft.SqlTools.Utility;
namespace Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.TSQLExecutionEngine
{
internal class TestExecutor : IDisposable
@@ -322,13 +324,13 @@ namespace Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.TSQLExecutionEn
private static void OnBatchParserExecutionFinished(object sender, BatchParserExecutionFinishedEventArgs e)
{
Console.WriteLine("ON_BATCH_PARSER_EXECUTION_FINISHED : Done executing batch \n\t{0}\n\t with result... {1} ", e.Batch.Text, e.ExecutionResult);
if (execResult == ScriptExecutionResult.All)
{
execResult = e.ExecutionResult;
if (execResult == ScriptExecutionResult.All)
{
execResult = e.ExecutionResult;
}
else
{
execResult |= e.ExecutionResult;
else
{
execResult |= e.ExecutionResult;
}
}
@@ -355,13 +357,13 @@ namespace Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.TSQLExecutionEn
Console.WriteLine("ON_EXECUTION_FINISHED : Script execution done with result ..." + e.ExecutionResult);
_isFinished = true;
if (execResult == ScriptExecutionResult.All)
{
execResult = e.ExecutionResult;
if (execResult == ScriptExecutionResult.All)
{
execResult = e.ExecutionResult;
}
else
{
execResult |= e.ExecutionResult;
else
{
execResult |= e.ExecutionResult;
}
resultCounts = eventHandler.ResultCounts;