format one feature at a time

24 views
Skip to first unread message

Guillaume Perrault Archambault

unread,
Dec 25, 2024, 8:26:36 PM12/25/24
to Verible Users
Hello and thanks for your great work.

I work on a verification team with many users and a large code base.

I hope to get the team to adopt a standard formatting style for .sv source code. Once the team agrees on a formatting style, my plan is to verify (using --verify) that all existing .sv files adhere to the agreed upon format, and ask the owners of each violating file to fix.

However, doing so all at once would have too big an impact. So I'd like to do this one formatting feature at a time at first, starting with indentation.

Is there a way to format a file on a per-feature basis? For instance, run the formatter with a switch that tells it to only fix the file's indentation.

Thanks in advance.

David Fang

unread,
Dec 31, 2024, 12:29:20 PM12/31/24
to Guillaume Perrault Archambault, Verible Users
Hello and thank you for your interest in Verible, apologies for the late reply, I've been very offline over the holidays.

In principle, this is a nice idea, but trying to fix indentation only is not without risks.
If adding correct indentation (or hang-indentation of already wrapped lines) results in overflowing line length, what would you want to happen?
Prioritizing one style rule over another could be debatable, as well as configurable.



--
You received this message because you are subscribed to the Google Groups "Verible Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to verible-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/verible-users/ebf6724b-a2fc-4596-84b5-1225edefa6b2n%40googlegroups.com.

Guillaume Perrault Archambault

unread,
Dec 31, 2024, 1:36:16 PM12/31/24
to David Fang, Verible Users
(replying again via reply all, sorry to David who will receive this twice)

Hi David,

Thanks for replying. No issues with the reply time. Wish you a happy new year.

Does your question pertain to the column limit? That's a good point, I suppose I'd want it to do nothing if the column limit "rule" (style?) is disabled, and behave as usual if that rule is enabled.

Perhaps your larger point is that some rules are so intertwined that they cannot be disabled/enabled independently(?). If that is the case, perhaps the tool could be made to reject illegal/unsupported combinations of enabled/disabled styles?

Ability to configure which styles are turned on/off would be great, as I suspect there are many use cases where a user cares about only a subset of styles (and may care that certain styles are *not* implemented).

Am I asking for something realistic?
Reply all
Reply to author
Forward
0 new messages