Delphi-RAG-Lint

YADF options

Join routine headers split by hand

Since: 1.0.21.0 · Default: true · INI key: JoinRoutineHeaders · CLI flag: --join-headers

A routine header the author split across lines is joined back onto one line; when the joined line is longer than the max length it is re-wrapped after the rightmost ';' or ',' that fits, continuing one indent step in. On by default (this is the standard behaviour).

Off gives the opposite layout: one parameter per line. Off therefore IMPLIES Break parameters one per line -- the engine treats that option as on, and the Options page shows its box checked and disabled while this one is unchecked. A header with fewer than two parameters is not broken. A // comment inside a split header still blocks the join, as before.

Independent of Reflow lines (join and wrap): turning that off does not stop headers from being joined.

Example

Real YADF output for the "JoinRoutineHeaders + BreakParamsOnePerLine" block of the preview sample (Demo\Sample.pas), all other options at their defaults:

// input
procedure ShowJoinHeader(
  const AName: string;
  ACount: Integer);
begin
  Writeln(AName, ACount);
end;

procedure ShowBreakParams(const AName: string; ACount: Integer);
begin
  Writeln(AName, ACount);
end;

// JoinRoutineHeaders = true (default)
procedure ShowJoinHeader(const AName: string; ACount: Integer);
begin
  Writeln(AName, ACount);
end;

procedure ShowBreakParams(const AName: string; ACount: Integer);
begin
  Writeln(AName, ACount);
end;

// JoinRoutineHeaders = false
procedure ShowJoinHeader(
    const AName: string
    ; ACount: Integer
    );
begin
  Writeln(AName, ACount);
end;

procedure ShowBreakParams(
    const AName: string
    ; ACount: Integer
    );
begin
  Writeln(AName, ACount);
end;