New Issue: [Feature Request]: lint rule for ThenKeywordAndBlock

24867, "jabraham17", "[Feature Request]: lint rule for ThenKeywordAndBlock", "2024-04-16T00:56:40Z"

We already have the lint rule DoKeywordAndBlock which uses parser information to determine when a do keyword is redundant (i.e., for i in 1..10 do { }). We should do the same for if statements with the then keyword with it is redundant (i.e. if cond then { }).

I expect the correct thing to do to make this work is to add similar parser as do keywords, where we could probably reuse UNNECESSARY_KEYWORD_AND_BLOCK. See parser: support UNNECESSARY_KEYWORD_AND_BLOCK tag on functions · Issue #24718 · chapel-lang/chapel · GitHub for another issue about expanding this parser logic to functions