You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a style rule checking the presence of a pair of begin/end keywords for each construction that support it.
the obvious example would be with if/else if/else.
It might be interesting to split the case structure from the if one, as it might be convenient and less error-prone to have one-line case statements.
The name could be something like explicit-begin ou forbid-implicit-begin (a bit too long to my taste)
Test cases and examples
// This example should be diagnosed.if my_condition // <-- issue
signal <=1;
else// <-- issue
signal <=0;
other_signal <=1;
// This variant should NOT be diagnosed (negative test case)// Considered correct: ifmy_conditionbegin
signal <=1;
endelsebegin
signal <=0;
end
other_signal <=1;
This should be done regardless of the actual position of begin/end:
// This variant should NOT be diagnosed (negative test case)// Considered correct: if my_condition
begin
signal <=1;
endelsebegin
signal <=0;
end
other_signal <=1;
The case situation might be a little bit trickier:
// Maybe valid ? Configuration would be nice...case (stuff)
0: foo =1; // <-- Arguably OK1: foo =0; // <-- Same3:// <-- Arguably not OK
foo = bar;
default:begin// <-- Always OK
foo =0;
endendcase
Proposal
N/A
Additional context
N/A
Best regards,
Julien FAUCHER
The text was updated successfully, but these errors were encountered:
Summary
It would be nice to have a style rule checking the presence of a pair of begin/end keywords for each construction that support it.
the obvious example would be with if/else if/else.
It might be interesting to split the case structure from the if one, as it might be convenient and less error-prone to have one-line case statements.
The name could be something like
explicit-begin
ouforbid-implicit-begin
(a bit too long to my taste)Test cases and examples
This should be done regardless of the actual position of begin/end:
The case situation might be a little bit trickier:
Proposal
N/A
Additional context
N/A
Best regards,
Julien FAUCHER
The text was updated successfully, but these errors were encountered: