[repo-assist] Remove dead code in TakeCodeBlock active pattern - #1341
Draft
github-actions[bot] wants to merge 1 commit into
Draft
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Removes a stale commented-out implementation block and a tautological guard condition (spaceNum >= 4, where spaceNum is hardcoded to 4 and never varies) from Lines.(|TakeCodeBlock|_|) in StringParsing.fs. Pure cleanup with no behavior change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nojaf
approved these changes
Sep 21, 2026
This branch has not been deployed
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.
🤖 This PR was created by Repo Assist, an automated AI assistant for this repository.
What
Removes dead code from the
(|TakeCodeBlock|_|)active pattern insrc/Common/StringParsing.fs:spaceNum >= 4in the pattern match —spaceNumis a locallethardcoded to4a few lines above and never varies, so this condition always evaluated totrueand was misleading (it reads as ifspaceNumcould take other values).Why
Pure readability cleanup with no behavior change: the guard always passed, so removing it changes nothing about parsing results. The commented-out block was leftover from an earlier draft of the implementation and added noise without value.
Trade-offs
None — this is a strictly internal, non-breaking cleanup confined to a single private active pattern. No public API, no user-visible behavior, and no RELEASE_NOTES entry is needed per project convention (internal-only change).
Test Status
dotnet build FSharp.Formatting.sln --configuration Release— build succeeded, 0 warnings, 0 errors.dotnet test tests/FSharp.Markdown.Tests --configuration Release --no-build— 375/375 tests passed.dotnet fantomas src/Common/StringParsing.fs— no formatting changes needed.Add this agentic workflow to your repo
To install this agentic workflow, run