Skip to content

[repo-assist] Remove dead code in TakeCodeBlock active pattern - #1341

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/improve-remove-dead-takeblock-code-20260921-5ad053fc34b54107
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/improve-remove-dead-takeblock-code-20260921-5ad053fc34b54107

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant for this repository.

What

Removes dead code from the (|TakeCodeBlock|_|) active pattern in src/Common/StringParsing.fs:

  1. A stale, fully commented-out implementation block (lines that computed nothing and were never active).
  2. A tautological guard condition spaceNum >= 4 in the pattern match — spaceNum is a local let hardcoded to 4 a few lines above and never varies, so this condition always evaluated to true and was misleading (it reads as if spaceNum could 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.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@4bc8419fad05e6b032741cbfd189986700bcf71c

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>

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant