Delphi-RAG-Lint

YADF options

YADF (Yet Another Delphi Formatter) is configured with the options below. The same list appears in YADFSetup and on the Delphi Tools > Options page, and is stored in the INI file of the active profile.

Line length & indentation

  • Max line length

    Maximum line length in columns. Long lines are reflowed when "Reflow long lines" is on.

  • Indent step

    Indentation step in spaces (each nesting level adds this many).

  • Tab width

    Width assumed for an existing tab on input. YADF always emits spaces.

Reflow & whitespace

Casing

Assignment & alignment

Spacing

  • Space around operators

    One space around binary operators (A+B -> A + B). Unary signs and generic brackets are left alone.

Uses clauses

Declarations

Comments

  • Indent comments

    Re-indent comment-only lines to the surrounding code depth. A "//." comment keeps its indentation.

Delphi 10 compatibility

  • Downgrade inline vars

    Hoist inline var declarations into a var block so the code builds on Delphi 10.2.3. Best-effort.

Labels & markers

  • Label long blocks

    Mark the end of long blocks with the block keyword: "end; // while".

  • Label min lines

    Minimum block length in lines before a long block gets an end label.

  • Mark unclosed blocks

    Add a "// TODO -oYADF" marker where a begin/record/... has no matching end.

File & CLI (no preview effect)

  • Backup before overwrite

    Create a backup of every file before overwriting it.

  • Backup directory

    Directory for backups (used when backup is on). Empty = next to the original file.

  • Result directory

    Directory for formatted output. Empty = format in place.

  • Output encoding

    ANSI keeps each file's own encoding; UTF-8/UTF-16 convert the output (with BOM).

  • Logging

    Write a log file with details of every option resolved and file processed.

Profiles & IDE integration