trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: December 2014

Re: [trinity-devel] TDE GIT thaw, build farm status, and future direction

From: Michele Calgaro <michele.calgaro@...>
Date: Fri, 12 Dec 2014 11:03:27 +0900
On 12/12/2014 02:03 AM, Timothy Pearson wrote:
> 5.) Codebase formatting.  While this is not a major problem for the users
> I have been tripped up more than once by the fact that some portions of
> the codebase (twin among others) use a vastly different style of
> indentation and bracing, one that is (IMHO) extremely hard to read and/or
> modify.  This in turn has therefore contributed to many "fix up prior
> commit" commits and/or outright regressions in GIT.  I greatly prefer
> Stroustrup style formatting with hard tab indentation (no space or
> combined space/tab indents) and indented public/protected/private blocks.
> This style is highly legible, emphasizes the control flow, and produces a
> minimal number of non-whitespace difference lines when an if/else block is
> modified.  All of the new code (thousands and thousands of lines of it)
> that I have contributed to TDE have been in this style.  I have been
> toying with reformatting the entire TDE codebase in one large commit; if
> there are no objections I think this step could greatly improve both our
> development speed and the overall quality of the codebase; comments and
> discussion are welcome.

Hi Tim,
very glad you raised this point, I also wanted to discuss it after the release of v14.0.0.
I am an extremely massive supporter of well-styled, well-indented code, to the point that a single line badly indented 
bothers me. So I fully support the idea of re-styling TDE code.

Now come question 1: what style should be follow? Style is a subjective matter and different people use different style.
Therefore I would suggest that you, Slavek, I and Francois discuss a bit about different style guidelines and find one 
that is fine for all. Probably each of us will have to compromise a bit on that.
I will try to come up with some key points to check and later share them with you. This won't be before the week after 
next, though.

Question 2: once we set on a style, we should have a way to enforce it (something like Lint or equivalent tool). Is 
there any way we can do that before a git commit is accepted?

Cheers
   Michele