-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alignment incorrect for range declarations of unconstrained record elements spread over multiple lines #1250
Comments
Hi @obruendl. Thanks for raising this issue. I will try to take a look soon. The config file that you've referenced is > 4k lines long. If you would be able to provide a minimal reproducible example, i.e. a minimal config file that demonstrates your problem, it would help us to investigate this more quickly. |
See attached test case. |
Hi @obruendl. Thanks very much for the MRE. I can reproduce your problem. In fact, I've discovered that it occurs with the default config, so it is not due to your config and there was no need to attach a config file after all. I'll investigate further when I get a chance and try to come up with a solution. |
I've found the source of this problem. There is a variable called if bIgnoreStartParen:
dExpectedIndent[iLine + 1] = iColumn + 1
else:
dExpectedIndent[iLine + 1] = iColumn @jeremiah-c-leary There are no comments in the code that I can find to explain why this is being done. Do you have any recollection of why these rules have this extra indentation added? Would you be opposed to me removing the extra indentation to bring these rules in line with the rest of the rules? |
After revisiting this, I can see that the formatting is broken in a different way if I just disable if statement and always use the second option. It will require further investigation. |
Afternoon @JHertz5 ,
I used blame and tracked the addition to issue #539, but there was nothing specific about the I will see if I can remember anything else. --Jeremy |
Environment
Ubuntu 20.04
Describe the bug
Range declarations for unconstrained record elements are off by one column if spread over multiple lines (otherwise VSG does report errors). Can this be fixed? Example here
It's of course possible that this somehow has to do with my indent configuration. You can find my config file here
To Reproduce
Expected behavior
I would expect all unconstrained record element range declarations to start on the same column but they are off by one. If I put them to the same column, this leads to linting errors.
Screenshots
Additional context
None
The text was updated successfully, but these errors were encountered: