Home Fabio Cortesi Stefan Jäger

Welcome to the Joint-Venture Blog from Fabio Cortesi and Stefan Jäger.

 

 
 

 

Ever wondered, how you can force a team to use same code style and same code convention?

If you use Eclipse,  there is a simple solution. Just install these two plug-ins und the live will be easier ;-)

  • Checkstyle
    Used to check the layout of the code. Do all methods have it’s Javadoc? Has the file the company header? Can be easily used in Eclipse and with Ant. 
     
    enable Checkstyle on a project:
     Checkstyle Property Window  
     
    run Checkstyle (could also be done by ANT):
     Checkstyle - check code  
     
    check out the warnings on the left border:
     Checkstyle - warning 
     
     
     
  • FormatOnSave
    Eclipse plug-in, which formats the code on every save. Simply install this plug-in on the Eclipse installation of every team member and the code is now always in correct format. Just don’t forget to define the right format template on each installation.
     
    FormatOnSave
    OI = Organize Imports (on save)
    SM = Sort Members (on save)
    CI = Correct Identation (on save)
    F = Format (on save)

 

 

 

« Newer Posts