svls icon indicating copy to clipboard operation
svls copied to clipboard

Question about oneline IF

Open nikhenri opened this issue 5 years ago • 1 comments

Hi, I wonder if this warning is incorrect : image

All if seem to be detect as multiline, I got this issue on every oneline if Is this the expect behavior ?

Thank you :)

nikhenri avatar Jan 06 '21 05:01 nikhenri

This is expected. The if(o_axis_tlast_p) ovg_axis_tkeep_p <= 0; is counted as two lines.

This rule intends the following case. z <= 1 seems to be in if statement, but not actually.

if(x)
  y <= 0;
  z <= 1; // this is not in if statement

So if statement should have begin/end except for the following case:

if (x) y <= 0;

dalance avatar Jan 06 '21 05:01 dalance

@nikhenri Would you close this if you're satisfied?

DaveMcEwan avatar Nov 21 '22 16:11 DaveMcEwan