Open maltaisn opened 4 weeks ago
Hi @maltaisn. Thanks for raising this. I have also experienced this issue. I'll try to take a look soon.
Hi @maltaisn.
I've figured out the problem. variable_assignment_004
should not be acting here, this case should be covered by variable_assignment_401
which is designed to act on arrays. The "parent rule" for variable_assignment_004
has a check which should skip the rule when it detects that it is acting on an array assignment (since it is assumed that there will be a separate rule to handle the array assignment). However, this check was coded to check only for signal assignment operators (<=
).
return utils.are_next_consecutive_tokens_ignoring_whitespace(["<=", "("], 0, oToi.get_tokens())
Since variable assignments use a different assignment operator, the check that should be skipping them does not skip them. I've raised a PR (#1313) to correct the issue. If you have a chance, please check the branch https://github.com/JHertz5/vhdl-style-guide/tree/issue-1295 and confirm that the fix works for you.
It works for the example I gave, thanks.
For the following file:
I get the following errors with the default configuration:
The errors are fixed if either
variable_assignment_401
orvariable_assignment_004
is disabled.