Ran into a scenario for a potential new warning that falls into a similar bucket as Wmisleading-indentation and Wdangling-else.
Specifically, if a line of code has an 'end' followed by an 'if' without an 'else', then the new rule would flag that the code is likely missing an 'else' statement. This rule would be more applicable to coders that use K&R style 'bracing' versus Allman style.
class C;
int a;
int b;
function f();
if ( a > 3) begin
end if (b > 3) begin // <--- user intended this to be 'end else if'
end
endfunction
endclass
Ran into a scenario for a potential new warning that falls into a similar bucket as Wmisleading-indentation and Wdangling-else.
Specifically, if a line of code has an 'end' followed by an 'if' without an 'else', then the new rule would flag that the code is likely missing an 'else' statement. This rule would be more applicable to coders that use K&R style 'bracing' versus Allman style.