Skip to content

Fix extra newline on writing error output - #2289

Merged
jonsequitur merged 1 commit into
dotnet:mainfrom
MiYanni:FixExtraNewlineOnError
Nov 7, 2023
Merged

jonsequitur merged 1 commit into
dotnet:mainfrom
MiYanni:FixExtraNewlineOnError

Conversation

@MiYanni

@MiYanni MiYanni commented Nov 7, 2023

Copy link
Copy Markdown
Member

Related: dotnet/sdk#33126

Summary

ParseErrorAction has ShowTypoCorrections enabled by default. The processing for typo corrections involves looking through unmatched tokens and writing suggestions to the Output stream. However, if there are no unmatched tokens (and therefore, no suggestions to be made) this processing was adding a random extra newline to the output stream. This change in behavior is causing a test to fail in the SDK since that test expects no output in the Output stream on failure for that certain test scenario. I've added a condition to only output the extra newline if any unmatched tokens are present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants