New Issue: [Feature Request]: expand MisleadingIndentation lint rule

24866, "jabraham17", "[Feature Request]: expand MisleadingIndentation lint rule", "2024-04-16T00:52:17Z"

Here are a few suggestions on places where we should expand chplchecks lint rule for MisleadingIndentation

Right now the implementation only warns for loops that use do, but I think any block that uses do should warn. For example, on statements

on Locale[0] do
  writeln("hello");
  writeln("world"); // MisleadingIndentation

This can also apply to functions

proc foo() do
  writeln("hello");
  writeln("world"); // MisleadingIndentation

Lastly, if/else statements have a single statement version that could use the same warning, although the implementation logic would be different

if cond then
  writeln("hello");
  writeln("world"); // MisleadingIndentation
if cond then
  writeln("hello");
else
  writeln("goodbye");
  writeln("world"); // MisleadingIndentation