unchecked_directive
Finds #no_abc, #no_aoc or #asm with no comment saying why.
Category restriction, allow by default.
Off by default; the example is shown with the rule enabled.
#import "Basic";
sum :: (items: [] int) -> int #no_abc {
total := 0;
for items total += it;
return total;
}
main :: () {
print("%\n", sum(.[1, 2, 3]));
}warning[unchecked_directive]: `#no_abc` has no comment saying why it is needed
--> example.jai:3:31
|
3 | sum :: (items: [] int) -> int #no_abc {
| ^^^^^^^
|
= help: add a `//` comment on this line or the line above: why the checks are not needed here#import "Basic";
sum :: (items: [] int) -> int {
total := 0;
for items total += it;
return total;
}
main :: () {
print("%\n", sum(.[1, 2, 3]));
}Each #no_abc, #no_aoc and #asm needs a comment on its own line or the line just above.