Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.01 KB

File metadata and controls

39 lines (25 loc) · 1.01 KB

Fantomas

F# source code formatter. Parses F# to an untyped AST (via vendored FCS), transforms it to an intermediate representation called Oak (SyntaxOak.fs), then prints it back via writer events (CodePrinter.fs + Context.fs).

Build & Test

dotnet build fantomas.sln
dotnet test src/Fantomas.Core.Tests/

Diagnostic Scripts

All scripts accept a file path or stdin, with optional --signature and --editorconfig <content> flags.

  • scripts/ast.fsx — untyped AST
  • scripts/oak.fsx — Oak tree
  • scripts/format.fsx — format with local build
  • scripts/writer-events.fsx — writer events produced during formatting

Scripts require a debug build first (dotnet build src/Fantomas/Fantomas.fsproj).

Post-task Steps

Run these after completing a task, not during iterative development — analyzers can be slow.

Format

dotnet fantomas src docs build.fsx

Analyzers

dotnet fsi build.fsx -- -p Analyze

Output goes to analysis.sarif in the repo root.