Delphi-RAG-Lint
Products · YADF

One formatter. Command line, settings editor and IDE.

YADF (Yet Another Delphi Formatter) reformats .pas, .dpr, .dpk and .inc source by a rule set you configure: line-length budgeting, structural re-indentation, capitalization and column alignment.

One engine drives the command-line tool, a live-preview settings editor and a Delphi IDE package, from the same settings files. Formatting is idempotent: formatting formatted code changes nothing. A content guard checks every result against its input, and malformed source does not crash it.

01 — How it works

Set it once, format everywhere

1. Tune your styleIn YADFSetup or on the IDE settings page, watching the result change live.
2. Save it as a profileKeep any number of profiles; assign up to two to the IDE shortcuts. The CLI uses the same files.
3. Format anywhereA buffer in the IDE, or a whole project from the command line, with the same result.
02 — What it does

What it does

screenshot coming

Format in the IDE

Ctrl+Shift+Alt+F formats the current buffer with your F profile, Ctrl+Shift+Alt+R with your R profile. No restart.

More →
screenshot coming

Whole projects from the CLI

Files, folders, or a .dpr/.dproj in one run.

More →
screenshot coming

Line length you choose

Full reflow: joins lines that fit, breaks lines that overflow, one item per line in uses clauses and argument lists.

More →
screenshot coming

Smart column alignment

Lines up : in declarations, = in const blocks, := and trailing comments, keeping columns tight.

More →
screenshot coming

Structural re-indent

Sections, classes and records, begin/end, case/try, loop bodies, else-if chains.

More →
screenshot coming

Consistent capitalization

Lowercase keywords, upper-case hex digits and directive names, consistent identifier casing.

More →
screenshot coming

Safe by design

Idempotent output, a content guard on every result, optional backups, --check round-trip, fixed exit codes; the original is never lost if a save fails.

More →
screenshot coming

Live settings editor

YADFSetup: Settings | Source | Result, re-formatting as you change a setting.

More →
screenshot coming

Profiles and a profile catalog

Two active profiles: F for the main shortcut and the CLI, R for a second shortcut. Keep any number of saved profiles and assign them with Set F / Set R on the IDE Options page (Tools > Options > Third Party > YADF), with a live before/after preview. Changes apply on the next format, no restart.

More →
screenshot coming

Delphi 10 downgrade (experimental)

Moves inline var declarations into a classic var block so code from 11-13 can build on 10.2.3. Best effort: ambiguous cases are left marked for you to finish.

More →
03 — Where it works

Embarcadero RAD Studio and the command line

RAD Studio IDE
YADFOT plugin, Win32 and Win64 packages; Help > Tools > YADFOT: Format Current Buffer.
Command line
YADF.exe, Win64, no Delphi installation needed.
Settings editor
YADFSetup.exe, Win64.
Not yet
VS Code and other editors; Linux, macOS.
04 — Built for our own work

Formats Micronite every day

Like DL, YADF grew out of the development of HTR Micronite, our quality and production-control software for manufacturers.