Skip to content

#2416 Fix Agrico alignment invalid output - #2

Merged
randrag merged 4 commits into
agrico-custom-mainfrom
bugfix/2416-fantomas-invalid-fsharp-alignment
May 1, 2026
Merged

#2416 Fix Agrico alignment invalid output#2
randrag merged 4 commits into
agrico-custom-mainfrom
bugfix/2416-fantomas-invalid-fsharp-alignment

Conversation

@randrag

@randrag randrag commented May 1, 2026

Copy link
Copy Markdown

Summary

  • Fixes Agrico MatchArrowAlignment so an aligned inline arm is only used when the aligned form still fits on the line.
  • Falls back to a natural multiline match arm when alignment padding would make the body wrap invalidly.
  • Avoids the inline-first-field union payload layout for anonymous record payloads.
  • Adds neutral regression tests for the match-arrow and anonymous-record union-case cases from AgricoZA/Ops#2416.
  • Moves canonical agent guidance to AGENTS.md and leaves CLAUDE.md as a pointer.
  • Bumps package version to 8.0.0-alpha-012-agrico-008.

Verification

  • dotnet test src/Fantomas.Core.Tests --filter "FullyQualifiedName~AgricoMatchArrowAlignmentTests" --no-restore
  • dotnet test src/Fantomas.Core.Tests --filter "FullyQualifiedName~AgricoUnionCaseAlignmentTests" --no-restore
  • dotnet test src/Fantomas.Core.Tests --no-restore
  • dotnet fantomas src docs build.fsx
  • dotnet fsi build.fsx -- -p Analyze
  • dotnet fsi build.fsx

Package published: fantomas 8.0.0-alpha-012-agrico-008.

@randrag
randrag merged commit 628409c into agrico-custom-main May 1, 2026
15 of 18 checks passed
@randrag
randrag deleted the bugfix/2416-fantomas-invalid-fsharp-alignment branch June 8, 2026 07:07
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.

1 participant