It's not a secret anymore!
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Formatter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Formatter" Watch "Formatter" New topic


Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
Having trouble with eclipse's formatter, it's supposed to be according to Sun's conventions but doesn't pass checkstyle, which is also set to Sun's conventions. Anyhat, what do you guys use?
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516

I modified eclipse formatter options to do it exactly the way I want :
- 80 caracters per line
- blank line before the 1st member in classes...

Also, Checkstyle checks more than what the Eclipse formatter does I believe.Their scope are different.

For instance, checkstyle will tell you that your variable name is not correct, or that you should use a keyword in a specific situation. Eclipse, will only put the right tabulation.

I use both.

I have a question though. Checkstyle keeps telling me that my methods should have final arguments. is that something I should really do ?
It also bugs me with the order of keywords "final public static" Is that important also ?

I agree. Here's the link:
subject: Formatter
It's not a secret anymore!