Ticket #165 (new enhancement)

Opened 7 months ago

Last modified 4 months ago

code formating rule as part of the project

Reported by: StefanG Owned by: zingo
Priority: minor Milestone: Release 0.3.x
Component: MercurialEclipse Version:
Keywords: Cc: Doetsch

Description

I think it would be very handy to export the eclipse code formating rule of this project and also store them in the repository, since code formating of all code should be identically and the current rule are somehow not standard rule I would know. That would help to make patches better readable and easier to write for all of us. Thanks.

Attachments

compiler_settings.bundle (12.0 kB) - added by StefanC 5 months ago.
changes to "almost" conform to all compiler setttings

Change History

Changed 5 months ago by StefanC

Yes, this is needed. And there should be compiler settings too.

http://home.zingo.org/trac/mercurialeclipse/wiki/Hackers/CodeConventions

Changed 5 months ago by StefanC

I just set the compiler settings to what I proposed and got 970 errors, many of whom could probably be fixed with a clenup

Changed 5 months ago by zingo

Hello

Great page you added.

Here are my personal feelings about it.

I like most of the stuff but Im a sucker for { on a new line (as you might have seen) and I like longer lines e.g. I do not like forcing argument splitting as a rule but it is ok to have as a loose recomendation. Good that you pointed out no tabs an 4 spaces (I would have gone for 2 but 4 is ok for me and if that is proven better...

As for the "{" on a new line since there seem to be a java semi-standard for having it on the same line maybe I just have to "bend over" and swollow my pride :) As a note: I have never been forced with codeing with { on the same line all my work-related code-standard have always had it on a new line, but after a while I might probably get used to it.

Im no grumpy old man (yet) so any coding standard against my will that will result in more patches submitted should be forced on me :)

Changed 5 months ago by StefanC

I'm no zealot for one style over the other either, as long as there is a formatter style that I can use without breaking the style of the current code :-). The rule should be that the formatter is right, the programmer is wrong. Ie striking ctrl+shift+f every minute should sit in the backbone :D. Or even better, use it on save as onSave action :-).

It would be nice if it could be agreed upon a style and compiler setting sooner than later and then do a code cleanup and formatting. Then we can do a fresh clone/pull and start hacking on what matters :D

Changed 5 months ago by StefanC

changes to "almost" conform to all compiler setttings

Changed 5 months ago by StefanC

Ive made a bundle of a cleanup and added compiler settings. You may have to enable project specific settings for them to become activive. There should still be 4 compiler errors (sanity check) which I am unsure of if its safe to delete, it looks like dead code, or could be something else.

Changed 5 months ago by zingo

  • priority changed from major to minor
  • type changed from task to enhancement
  • milestone set to Release 0.3.x

Added, thanx for the help.

Changed 4 months ago by Bastian Doetsch

  • cc Doetsch added

As the format & compiler settings are now in the repo, I think we can close this ticket?

Note: See TracTickets for help on using tickets.