On 11/01/2014 07:00 PM, David ‘Bombe’ Roden wrote:
...
> I’m not a big fan of these single large commits that reformat all
> source code at once. As Google’s style guide mandates a little bit
> more than just whitespace and bracket position (e.g. that overloaded
> methods/constructors must not be interrupted by other methods, or
> that the order of fields and method must conform to some logical
> order, i.e. not a chronological order) most of the code must be
> manually checked and potentially corrected.
> 
> I wouldn’t really touch the existing source code immediately but make
> sure that a) new source code conforms to the style guide, and b)
> touched code is reformatted: at least edited methods should be
> reformatted, preferrable after the “real” commit so that functional
> changes are not lost in the formatting. If the whole file is rather
> easy to adapt to the new style, the whole file can be changed, too.
> 
> Thoughts, suggestions, opinions?

While I can understand the thought behind not wanting to touch all the
code at once, I think it makes a transition messy and interminable.
Writing new code following a different guide makes both feel out of
place, and we don't have enough code modification going on to
organically make this transition.

I would be up for, after pull requests that should be merged are merged,
automatically formatting the codebase to meet Google's Java style guide
with as much as it can without changing the bytecode. That way following
the style guide in new code won't feel as out of place, and anything
with annotate or bisect can be assured that the formatting commit did
not change functionality.

> Greetings,
> 
> Bombe
> 
> [1]: https://github.com/freenet/fred/pull/298/
> [2]: http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
> [3]: https://google-styleguide.googlecode.com/svn/trunk/javaguide.html


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to