mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-29 01:25:41 -05:00
Address error IDE0270 after MsBuild update (#1865)
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
||||
return new SqlTableDefinitionFormatter(visitor, codeObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal class SqlTableDefinitionFormatter : ASTNodeFormatterT<SqlTableDefinition>
|
||||
{
|
||||
private CommaSeparatedListFormatter CommaSeparatedListFormatter { get; set; }
|
||||
@@ -42,12 +42,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Formatter
|
||||
{
|
||||
if (child is SqlColumnDefinition && !(child is SqlComputedColumnDefinition))
|
||||
{
|
||||
SqlIdentifier identifierChild = child.Children.ElementAtOrDefault(0) as SqlIdentifier;
|
||||
|
||||
if (identifierChild == null)
|
||||
{
|
||||
throw new FormatFailedException("unexpected token at index start Token Index");
|
||||
}
|
||||
SqlIdentifier identifierChild = child.Children.ElementAtOrDefault(0) as SqlIdentifier ?? throw new FormatFailedException("unexpected token at index start Token Index");
|
||||
|
||||
string s1 = child.TokenManager.GetText(identifierChild.Position.startTokenNumber, identifierChild.Position.endTokenNumber);
|
||||
range1MaxLength = Math.Max(range1MaxLength, s1.Length);
|
||||
|
||||
Reference in New Issue
Block a user