Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Anyone mind if I run the code formatter on jface?

Hi Stefan.

Probably I was not clear enough, but I meant that you can't use git blame annotations *in Eclipse* which you can turn on in the editor. They are line based and usually if you run formatter almost all lines will be annotated with your last formatting commit and not with the real change. Since we have lot of undocumented code, the real source of the documentation (for me) was very often that line based commit annotations. They are valuable and one could (sometimes) read who, when and why changed that piece of code. After re-formatting this information will be lost for line annotations. Sure you still have the history and CLI tools but this doesn't help that fast and handy as the line annotations directly in the editor.

So from my point of view, for *existing* code we should only apply formatter:
1) on the code we change,
2) if possible, after the change (so that one can review the actual change first)
3) and only if it is not avoidable and the code looks really bad otherwise.

Kind regards,
Andrey Loskutov

http://google.com/+AndreyLoskutov


> Gesendet: Dienstag, 08. Dezember 2015 um 08:54 Uhr
> Von: sxenos@xxxxxxxxx
> An: "Andrey Loskutov" <platform-ui-dev@xxxxxxxxxxx>, "Eclipse Platform UI component developers list." <platform-ui-dev@xxxxxxxxxxx>, "Stefan Xenos" <sxenos@xxxxxxxxxx>
> Betreff: Re: [platform-ui-dev] Anyone mind if I run the code formatter on jface?
>
> Git has a "blame parent commit" feature intended for exactly this purpose.
> 
> Sent from my BlackBerry 10 smartphone.
>   Original Message  
> From: Andrey Loskutov
> Sent: Monday, December 7, 2015 21:52
> To: Eclipse Platform UI component developers list.; Stefan Xenos
> Reply To: Eclipse Platform UI component developers list.
> Subject: Re: [platform-ui-dev] Anyone mind if I run the code formatter on jface?
> 
> I would prefer you wouldn't run formatter on existing code. I do not plan any big change, but this would make git blame annotations diff useless and this is a major issue.
> 
> Am 8. Dezember 2015 05:07:15 MEZ, schrieb Stefan Xenos <sxenos@xxxxxxxxxx>:
> >Most of the files seem to be inconsistently formatted, which causes
> >pain
> >whenever the post-save action runs. IMO, it would make sense to
> >auto-format
> >the lot.
> >
> >The trouble is, a big change like this will create merge problems if
> >there's any big outstanding patches in the queue. Anyone working on
> >anything, or should I go ahead?
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >platform-ui-dev mailing list
> >platform-ui-dev@xxxxxxxxxxx
> >To change your delivery options, retrieve your password, or unsubscribe
> >from this list, visit
> >https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> 
> --
> Kind regards,
> Andrey Loskutov
> 
> http://google.com/+AndreyLoskutov
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
>


Back to the top