mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-21 01:25:42 -05:00
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:
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
|
||||
@@ -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.Diagnostics;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
//using System.Management.Automation.Language;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Diagnostics;
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
@@ -156,35 +158,35 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
/// <summary>
|
||||
/// Gets or sets the zero-based column number.
|
||||
/// </summary>
|
||||
public int Character { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base equality method
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
public int Character { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base equality method
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null || (obj as Position == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Position p = (Position) obj;
|
||||
bool result = (Line == p.Line) && (Character == p.Character);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base GetHashCode method
|
||||
/// </summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null || (obj as Position == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Position p = (Position) obj;
|
||||
bool result = (Line == p.Line) && (Character == p.Character);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base GetHashCode method
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 23 + Line.GetHashCode();
|
||||
hash = hash * 23 + Character.GetHashCode();
|
||||
return hash;
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 23 + Line.GetHashCode();
|
||||
hash = hash * 23 + Character.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,35 +203,35 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
/// </summary>
|
||||
public Position End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base equality method
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <summary>
|
||||
/// Overrides the base equality method
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
|
||||
if (obj == null || !(obj is Range))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Range range = (Range) obj;
|
||||
bool sameStart = range.Start.Equals(Start);
|
||||
bool sameEnd = range.End.Equals(End);
|
||||
return (sameStart && sameEnd);
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
|
||||
if (obj == null || !(obj is Range))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Range range = (Range) obj;
|
||||
bool sameStart = range.Start.Equals(Start);
|
||||
bool sameEnd = range.End.Equals(End);
|
||||
return (sameStart && sameEnd);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base GetHashCode method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Overrides the base GetHashCode method
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 23 + Start.GetHashCode();
|
||||
hash = hash * 23 + End.GetHashCode();
|
||||
return hash;
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 23 + Start.GetHashCode();
|
||||
hash = hash * 23 + End.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,33 +248,33 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
/// </summary>
|
||||
public Range Range { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base equality method
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <summary>
|
||||
/// Overrides the base equality method
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null || (obj as Location == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Location loc = (Location)obj;
|
||||
bool sameUri = string.Equals(loc.Uri, Uri);
|
||||
bool sameRange = loc.Range.Equals(Range);
|
||||
return (sameUri && sameRange);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base GetHashCode method
|
||||
/// </summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null || (obj as Location == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Location loc = (Location)obj;
|
||||
bool sameUri = string.Equals(loc.Uri, Uri);
|
||||
bool sameRange = loc.Range.Equals(Range);
|
||||
return (sameUri && sameRange);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base GetHashCode method
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 23 + Uri.GetHashCode();
|
||||
hash = hash * 23 + Range.GetHashCode();
|
||||
return hash;
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 23 + Uri.GetHashCode();
|
||||
hash = hash * 23 + Range.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.Diagnostics;
|
||||
|
||||
Reference in New Issue
Block a user