24718, "jabraham17", "parser: support UNNECESSARY_KEYWORD_AND_BLOCK tag on functions", "2024-03-29T18:07:37Z"
Currently, the Chapel parser marks locations where the user has do
where it is unnecessary with UNNECESSARY_KEYWORD_AND_BLOCK. For example,
on Locales[0] do {} // unnecessary
for i in 1..10 do writeln(i); // required
This is what allows the linter to warn for these cases. However, one case where the parser does not handle this is for functions
proc foo() do {} // should be unnecessary
Because the parser does not mark this block as UNNECESSARY_KEYWORD_AND_BLOCK, the linter will not warn in this case.
This should not change how Chapel programs are parsed, but it will enable further tool features