Skip to content

Commit

Permalink
sneak some unrelated refactoring in
Browse files Browse the repository at this point in the history
  • Loading branch information
belav committed May 19, 2021
1 parent 10455c4 commit 81ab2a4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Src/CSharpier/SyntaxNodeComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ await NewSyntaxTree.GetRootAsync(cancellationToken)
}

var message =
"----------------------------- Original: "
+ GetLine(result.OriginalSpan, this.OriginalSyntaxTree, this.OriginalSourceCode);
$"----------------------------- Original: {GetLine(result.OriginalSpan, this.OriginalSyntaxTree, this.OriginalSourceCode)}";

message += "----------------------------- Formatted: "
+ GetLine(result.NewSpan, this.NewSyntaxTree, this.NewSourceCode);
message += $"----------------------------- Formatted: {GetLine(result.NewSpan, this.NewSyntaxTree, this.NewSourceCode)}";
return message;
}

Expand All @@ -78,8 +76,7 @@ private string GetLine(TextSpan? textSpan, SyntaxTree syntaxTree, string source)
var line = syntaxTree.GetLineSpan(textSpan.Value).StartLinePosition.Line;
var endLine = syntaxTree.GetLineSpan(textSpan.Value).EndLinePosition.Line;

var result =
"Around Line " + line + " -----------------------------" + Environment.NewLine;
var result = $"Around Line {line} -----------------------------{Environment.NewLine}";

var stringReader = new StringReader(source);
var x = 0;
Expand Down

0 comments on commit 81ab2a4

Please sign in to comment.