Skip to content

Commit 4f10198

Browse files
committed
Corrections for trailing spaces
* Extension was added in new machine shift but defaults to "trim on save" which is bad
1 parent d9ef97a commit 4f10198

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ of multiple small libraries that didn't warrant a distinct repository.
1212
| [Ubiquity.NET.Runtime.Utils](https://ubiquitydotnet.github.io/Ubiquity.NET.Utils/runtime-utils/index.html) | This library contains common support for DSL runtime and language implementers |
1313
| [Ubiquity.NET.SourceGenerator.Test.Utils](https://ubiquitydotnet.github.io/Ubiquity.NET.Utils/src-gen-test-utils/index.html) | This library contains extensions and helpers for testing source generators |
1414
| [Ubiquity.NET.SrcGeneration](https://ubiquitydotnet.github.io/Ubiquity.NET.Utils/SrcGeneration/index.html) | This library contains extensions and helpers for implementing source generators |
15+
16+
>[!IMPORTANT]
17+
> When editing code in this repository make certain that any extensions or tooling that
18+
> automatically removes trailing whitespace is disabled. It is fine to highlight such cases
19+
> and most of the time remove any. However, there are some tests where a trailing whitespace
20+
> is required and a critical part of the tests.

src/Ubiquity.NET.SrcGeneration.UT/CSharp/TextWriterExtensionsTests.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,14 @@ This is a remarks line
170170
This is another discrete line. The preceding duplicate blank is removed.
171171
""";
172172

173-
// NOTE: Literal strings requires a blank line to indicate a line terminator.
173+
// NOTE: Literal strings require a blank line to indicate a line terminator.
174174
// Otherwise, the compiler generates a string without a terminating new line!
175+
// Also note, that there is an intentional trailing whitespace to indicate a
176+
// non-empty line for this test.
175177
const string expected = """
176178
/// <remarks>
177179
/// This is a remarks line
178-
///
180+
///
179181
/// This is another discrete line. The preceding duplicate blank is removed.
180182
/// </remarks>
181183
@@ -226,11 +228,13 @@ This is another discrete line. The preceding duplicate blank is removed.
226228

227229
// NOTE: Literal strings requires a blank line to indicate a line terminator.
228230
// Otherwise, the compiler generates a string without a terminating new line!
231+
// Also note, that there is an intentional trailing whitespace to indicate a
232+
// non-empty line for this test.
229233
const string expected = """
230234
/// <summary>description of this API</summary>
231235
/// <remarks>
232236
/// This is a remarks line
233-
///
237+
///
234238
/// This is another discrete line. The preceding duplicate blank is removed.
235239
/// </remarks>
236240

0 commit comments

Comments
 (0)