-
Notifications
You must be signed in to change notification settings - Fork 226
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
Options File #2362
Comments
shows
Note that the You just need to write the flags in -indentation_spaces=4
-inplace=true
+--indentation_spaces=4
+--inplace=true |
Ahh, okay so you still need the -- prefix in the flagfile. I'll try that tomorrow when I get back to work. Thanks. |
This works fine -- just need to figure out what I want to do at a project level for this. Maybe one quick question here instead of opening a new issue (in case I'm just not understanding terminology -- I'm usually a VHDL guy.) Is there a way to align the default assignments and possibly right hand side comments, for parameters, localparams, and signal assignments? For example, with the settings:
Aligns the following at the signal name:
However ideally I'd also like to see:
I did go through the list on And for that matter, is there something that controls subprogram parameter lists, so instead of:
I can get this:
|
I'm not familiar with the formatter, so I recommend you check the issues/usage in other projects. We can leave this open to see if anyone sees this and can provide better pointers.
This would work if you split declarations and assignments. I'm not sure if this fits your use-case or not. I don't know whether this is supposed to work or not, there aren't many tests/examples to infer this
The
I tried playing with the flags but couldn't get this to work. It looks like this only works for modules. |
Having initial defaults for signals/registers is pretty standard between the various HDLs. I don't see much benefit in splitting the assignment and initial values apart, so I will likely just have to live with the lack of alignment on the assignment and comment alignment. As far as the subprograms, that does seem like an oversight. I mean, sure, make it an option to do it either way, but I find it difficult to look at the subprogram interface list and parse it out at a glance since there's a lot of information there (direction, type, name, vector, etc. It's not a C interface list. Well here's hoping there's a way to do both of these things and/or can be added in the future. |
I was just suggesting a workaround. You can make feature request issues for these things (although I don't know if they already exist) but there isn't much work on the formatter. |
The amount of options (and the length of the names) make the CLI somewhat tedious to work with. I've got a new file that will do indentation, however the inference is not working for alignment. Hence I'm looking at having to specify all the align parameters.
However, there is the
--flagfile
option but I've seen no documentation on how this file is to be formatted. Is it just one option per line, or a JSON or YAML format (similar to the Github action). An example somewhere in the documentation would be mighty useful.Just as an example I tried putting the following in a txt file:
And I got the response:
So, clearly there's some expectation here that I'm not satisfying. Is there an example anywhere for this?
The text was updated successfully, but these errors were encountered: