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.IO;
using System.Linq;

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 System.IO;

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 System.IO;

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.IO;
using System.Text;

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 System.Data.SqlTypes;
@@ -157,10 +159,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
public void Int16([Values(
0,
10,
-10,
short.MaxValue, // Two byte number
0,
10,
-10,
short.MaxValue, // Two byte number
short.MinValue // Negative two byte number
)] short value)
{
@@ -169,10 +171,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
[Test]
public void Int32([Values(
0,
10,
-10,
short.MaxValue, // Two byte number
0,
10,
-10,
short.MaxValue, // Two byte number
short.MinValue, // Negative two byte number
int.MaxValue, // Four byte number
int.MinValue // Negative four byte number
@@ -183,10 +185,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
[Test]
public void Int64([Values(
0,
10,
-10,
short.MaxValue, // Two byte number
0,
10,
-10,
short.MaxValue, // Two byte number
short.MinValue, // Negative two byte number
int.MaxValue, // Four byte number
int.MinValue, // Negative four byte number
@@ -236,12 +238,12 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
[Test]
public void Single([Values(
0,
10.1F,
-10.1F,
float.MinValue,
float.MaxValue,
float.PositiveInfinity,
0,
10.1F,
-10.1F,
float.MinValue,
float.MaxValue,
float.PositiveInfinity,
float.NegativeInfinity
)] float value)
{
@@ -250,16 +252,16 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
[Test]
public void Double([Values(
0,
10.1,
-10.1,
float.MinValue,
float.MaxValue,
float.PositiveInfinity,
0,
10.1,
-10.1,
float.MinValue,
float.MaxValue,
float.PositiveInfinity,
float.NegativeInfinity,
double.PositiveInfinity,
double.NegativeInfinity,
double.MinValue,
double.PositiveInfinity,
double.NegativeInfinity,
double.MinValue,
double.MaxValue
)]double value)
{
@@ -577,11 +579,11 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
[Test]
public void GuidTest()
{
foreach (var testValue in GuidTestParameters)
{
VerifyReadWrite(testValue.ToByteArray().Length + 1, testValue,
(writer, val) => writer.WriteGuid(testValue),
(reader, rowId) => reader.ReadGuid(0, rowId));
foreach (var testValue in GuidTestParameters)
{
VerifyReadWrite(testValue.ToByteArray().Length + 1, testValue,
(writer, val) => writer.WriteGuid(testValue),
(reader, rowId) => reader.ReadGuid(0, rowId));
}
}