[icedtea-web] Proposed formatting for C++ side of plugin

Adam Domurad adomurad at redhat.com
Wed Nov 28 13:12:50 PST 2012


On 05/22/2012 04:49 PM, Deepak Bhole wrote:
> * Deepak Bhole <dbhole at redhat.com> [2012-05-22 16:48]:
>> * Adam Domurad <adomurad at redhat.com> [2012-05-22 16:06]:
>>> So, currently the C++ side of the plugin uses inconsistent indents (tabs
>>> and various # of spaces). An auto-format to make the code formatted more
>>> like the Java side could be beneficial.
>>>
>>> As Omair pointed out however, formatting HEAD will cause back-ports to
>>> become more difficult.
>>>
>>>   I therefore propose to create an Eclipse formatting profile that will
>>> define the standard formatting for the C++ side of the project, and then
>>> back-port this formatting profile so that future back-ported patches are
>>> not made more difficult due to indenting/line number differences.
>>>
>> Yep, there is a formatting profile for Java in the repos -- we'd just
>> have to add something similar for C++.
>>
>> Also, I am unclear as to what you mean by "back-port this formatting
>> profile" -- as in re-indent the code in stable branches?
>>
> Adam just confirmed that this indeed entails backporting the indentation
> changes.
>
> I am OK with this as it will strictly be a spacing only change and no
> matter when we do it, we will have to backport it to make future
> backporting easier.
>
> Given the scope, I think at least one more person should sign off on
> this one however.
>
> Cheers,
> Deepak
>
Ping. Still want this :).

I set up my eclipse autoformat to be near to the current format to keep 
things consistent - but the formatting itself right now is not 
consistent. As well, some parts of the formatting (ie return type on new 
line in function definition) I can't seem to get eclipse to do.
I think this will enhance readability of the C++ side for people that 
are use to staring at Java as well. :)

happy hacking,
-Adam



More information about the distro-pkg-dev mailing list