todo_marker
Finds a comment with a TODO, FIXME, XXX or HACK marker.
Category restriction, allow by default.
Off by default; the example is shown with the rule enabled.
#import "Basic";
// TODO: handle the empty list
first :: (items: [] int) -> int {
return items[0];
}
main :: () {
print("%\n", first(.[1, 2]));
}warning[todo_marker]: this comment has a `TODO` marker
--> example.jai:3:1
|
3 | // TODO: handle the empty list
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: finish it, or track it outside the source and remove the marker#import "Basic";
first :: (items: [] int) -> int {
if items.count == 0 return 0;
return items[0];
}
main :: () {
print("%\n", first(.[1, 2]));
}A marker is TODO, FIXME, XXX or HACK in capitals, standing alone (TODO: and (FIXME) count; todo, TODOS and AUTODOC do not).