Remove trailing whitespaces from tests - #20355
Merged
Merged
Conversation
Contributor
|
Contributor
|
🔍 Tooling Safety Check — Affects-Build-Infra
|
Contributor
|
Would probably be best to have an entry in https://github.com/dotnet/fsharp/blob/main/.git-blame-ignore-revs as well for this. |
xperiandri
force-pushed
the
remove-trailing-whitespace
branch
from
August 26, 2026 17:08
0301a07 to
d8e6673
Compare
T-Gro
approved these changes
Aug 27, 2026
xperiandri
force-pushed
the
remove-trailing-whitespace
branch
2 times, most recently
from
August 29, 2026 01:42
9783b54 to
c065d76
Compare
Member
|
The ignore from git blame should probably be another PR, because the commits from this PR are going to squashed. |
Contributor
Yes, you can't squash this indeed. |
Strips trailing whitespace from F# sources under tests/, vsintegration/tests, buildtools/ and docs/fcs-samples. Trailing whitespace is preserved wherever it is semantically significant: lines whose end falls inside a multi-line string literal (STRING_TEXT) or inside an inactive `#if` region are left untouched. Those lines were classified with FSharp.Compiler.Tokenization.FSharpSourceTokenizer rather than a regex, because many tests embed expected IL / expected compiler output in triple-quoted strings where trailing spaces are part of the baseline being compared -- stripping those was what broke CI previously. Verified with the F# tokenizer: the string-literal token stream is byte-identical before and after for every file touched. src/ and vsintegration/src are split out into a separate PR so that each stays under the 3000-file limit enforced by the release-notes check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Note: dotnet/fsharp squash-merges PRs, so this SHA points at the branch commit and will need rewriting to the squashed commit SHA afterwards -- the same caveat the file's own header documents for the existing entries. The companion src-only PR's SHA should be added in that same follow-up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
These files are parse-tree fixtures whose `.bsl` baselines assert exact column ranges, so the trailing space is part of what is being parsed: * `Unfinished escaped ident 01.fs` - the space sits inside an unterminated escaped identifier, which the lexer consumes to end of line. * `SynTypeFunHasRangeOfArrow.fs` - inside a line comment, whose range is printed via `ParsedInputTrivia.CodeComments`. * `RegressionOptionType.fs` - on the final, newline-less line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
xperiandri
force-pushed
the
remove-trailing-whitespace
branch
from
September 1, 2026 12:29
e1dc879 to
a75e648
Compare
xperiandri
added a commit
to xperiandri/fsharp
that referenced
this pull request
Sep 1, 2026
Strips trailing whitespace from F# sources under src/ and vsintegration/src, plus eng/Build.ps1. Trailing whitespace is preserved wherever it is semantically significant: lines whose end falls inside a multi-line string literal (STRING_TEXT) or inside an inactive `#if` region are left untouched. Those lines were classified with FSharp.Compiler.Tokenization.FSharpSourceTokenizer rather than a regex. Verified with the F# tokenizer: the string-literal token stream is byte-identical before and after for every file touched. Split out of dotnet#20355 so that each PR stays under the 3000-file limit enforced by the release-notes check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@T-Gro all green, can we merge? |
xperiandri
added a commit
to xperiandri/fsharp
that referenced
this pull request
Sep 1, 2026
Strips trailing whitespace from F# sources under src/ and vsintegration/src, plus eng/Build.ps1. Trailing whitespace is preserved wherever it is semantically significant: lines whose end falls inside a multi-line string literal (STRING_TEXT) or inside an inactive `#if` region are left untouched. Those lines were classified with FSharp.Compiler.Tokenization.FSharpSourceTokenizer rather than a regex. Verified with the F# tokenizer: the string-literal token stream is byte-identical before and after for every file touched. Split out of dotnet#20355 so that each PR stays under the 3000-file limit enforced by the release-notes check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
T-Gro
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes trailing whitespace from F# sources under
tests/,vsintegration/tests,buildtools/anddocs/fcs-samples(2932 files).src/andvsintegration/srcwere split out into #20393 so that each PR stays under the 3000-file limit enforced bycheck_release_notes— that check fails closed at >= 3000 changed files, before theNO_RELEASE_NOTESopt-out is even evaluated. No protected path is touched here, so this PR needs no release notes; #20393 carries them.No functional changes
Trailing whitespace is preserved wherever it is semantically significant. Lines whose end falls inside a multi-line string literal (
STRING_TEXT) or inside an inactive#ifregion are left untouched. Those lines were classified withFSharp.Compiler.Tokenization.FSharpSourceTokenizerrather than a regex.This matters here specifically: many tests embed expected IL and expected compiler output in triple-quoted strings, where trailing spaces are part of the baseline being compared. The earlier revision of this PR stripped 2936 such lines across 161 files, which is what broke CI.
Verification:
git diff -wreports no non-whitespace differences beyond 30 removed lines that consist only of whitespace and were the final, newline-less line of their file. None of thetests/fsharp/typecheck/sigs.bslbaselines reference a removed line.Blame
Per @nojaf's suggestion, an entry was added to
.git-blame-ignore-revs.Note that this repository squash-merges, so the recorded SHA points at the branch commit and will need rewriting to the squashed commit SHA afterwards — the same caveat the file's own header documents for the existing entries. #20393's SHA should be added in that same follow-up.