I actually mean something different: not a {todo}, but using user defined hints, warnings or errors.
Some todo's need a hint, {$hint this is not fully implemented}
Some todo's need a warning, {$warning this needs to be implemented or is a hack}
Some todo's must generate an error. {$error this is not finished}
See?
If you use these very obvious tools, you can create a "todo'" that the compiler itself warns you for or even stop compiling if the code really needs to be completed.
E.g:
program testtodo;
{$mode objfpc}
uses
Sysutils,Classes;
var
S: TStringList;
begin
{$hint need explanation}
S := TStringList.Create;
S.LoadFromFile('test.pas',TEncoding.Utf8);
writeln(S.Text);
{$warning no free yet}
S.Free;
{$error this is not finished yet, get back to work}
end.
Outputs:
Compiling test.pas
test.pas(11,4) Hint: User defined: need explanation
test.pas(15,4) Warning: User defined: no free yet
test.pas(17,4) Error: User defined: this is not finished yet, get back to work
test.pas(19) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
There's your todo's......
Toodles,
Thaddy