You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2006/04/15 01:03:41 UTC

Recommended Eclipse compiler options?

Dan,

Looks like you've been tracking and fixing warnings in various pieces of 
the runtime. I'm thinking that we should have a recommended set of 
Eclipse compiler preferences / guidelines for contributors on our 
"getting involved" page to help detect these warnings early. Which 
compiler/warning options do you think are important?

Any opinions as well from others in the group?

Is there a similar set of options for IDEA users?

-- 
Jean-Sebastien


Re: Recommended Eclipse compiler options?

Posted by Daniel Kulp <da...@iona.com>.

Sebastien,

> Looks like you've been tracking and fixing warnings in various pieces
> of the runtime. I'm thinking that we should have a recommended set of
> Eclipse compiler preferences / guidelines for contributors on our
> "getting involved" page to help detect these warnings early. Which
> compiler/warning options do you think are important?

For Celtix, we have an "ant" target that COMPLETELY sets up an eclipse 
workspace to include the compiler flags we want as well as the code 
format rules, import order rules, code templates, Checkstyle 
configuration, PMD rulesets, etc...    You have to keep in mind, we have 
STRICT code style rules.   All code is checked both by checkstyle as well 
as PMD during the build.   The build fails if the code doesn't pass.   We 
also add -Xlint to the javac line so you see lint warnings from the 
command line maven compile.  (your warnings would appear there)   
Checkstyle and PMD check more things than just style.   Things like 
unread variables, unused imports, etc...

Anyway, to specifically answer your question, we use eclipses defaults for 
compiler warnings except we turn OFF missingSerialVersion and 
unusedImport, but that is because the jaxb generated code violates those 
rules.   The problem with eclipse is that you cannot have different flags 
for generated code than for the real code.   Thus, we generally rely on 
checkstyle to do most of the checking and pmd for even more.  (PMD is 
very slow if you enable a bunch of things.  Thus, we only enable a couple 
PMD rules that checkstyle doesn't check.)

For celtix, we setup a page on our wiki for step-by-step instructions for 
setting up an eclipse workspace:
https://wiki.objectweb.org/celtix/Wiki.jsp?page=EclipseProjectSetup
Not sure if you want something similar.

Enjoy!
-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727  C: 508-380-7194
daniel.kulp@iona.com