vhdl-style-guide
vhdl-style-guide copied to clipboard
sequential_004 should allow alignment configuration
Is your feature request related to a problem? Please describe. This rule checks the alignment of multiline sequential statements but doesn't allow any configuration.
Other rules like concurrent_009 do allow such a configuration (what is the exact difference between sequential_004 and concurrent_009?).
Similar to #499.
Describe the solution you'd like I'd like to be able to configure the alignment to follow a default 2-spaces indentation.
Describe alternatives you've considered Not caring.
Related documentation typo
The rule concurrent-006
links to the "Configuring Keyword Alignment Rules".
The link is not the direct link (it seems - or is it intended to link to the configuration overview page?).
The page's URL is https://vhdl-style-guide.readthedocs.io/en/latest/configuring_conditional_expressions.html
.
Note that the filename differs from its title. This might be sth. to be made consistent.
Would having the same configuration options as concurrent_009
be sufficient?
Hi @jeremiah-c-leary,
I would say that this would make sense.
Again, as mentioned in the issue description, I'm actually not super sure to understand the difference between sequential_004
and concurrent_009
. Is it that a simple signal assignment statement would classify as sequential_004
and as soon as I add a when
condition, it turns into concurrent_009
? Or does the first require to be within a process
statement?
The key of my question is if they couldn't be the same rule.
Please note that I also updated the issue description: While checking I found a minor bug in the documentation.
Hey @staerz,
Again, as mentioned in the issue description, I'm actually not super sure to understand the difference between sequential_004 and concurrent_009. Is it that a simple signal assignment statement would classify as sequential_004 and as soon as I add a when condition, it turns into concurrent_009? Or does the first require to be within a process statement?
After researching a little, it looks like my multiline rules are a bit a of a mess.
Where:
- multiline_alignment_between_tokens = base rule which multiple rules can extend
- unique = implementation is only in that rule
- alignment = rule performs alignment
- structure = rule modifies the format of the code
I might be able to merge the options wrap_at_when
, align_when_keywords
and align_else_keywords
into the multiline_alignment_between_tokens
base rule. Then I could continue to extend the base rule to cover additional LRM Entities.
I need to ponder this for a bit.
--Jeremy
Yes, I would agree to unification here: All these are structural language elements where the same rules can apply (and should).
If you can hence manage to define a base rule and derive just the particular rules basically by the LRM keyword kicking in to catch up that base rule, that would be most consistent.
Hey @staerz ,
Since the updates for this issue are the same for variable_assignments, I was going to do updates for this issue on issue #549.
We can close this issue when we close the other issue.
--Jeremy
Yes, that sounds very fair to me and also funnels the discussion to one issue only.