views:

294

answers:

2

In Eclipse I can set all kinds of preferences for coding style. I'd like to be able to enforce these as an ant task to make the build break.

Can anyone give me an example of how to enforce eclipse coding styles in an Ant task?

(I KNOW about PMD, checkstyle etc - none of these EXACTLY match the eclipse preferences for coding style. I want an ant task that exactly matches the eclipse coding style)

+4  A: 

Try checkstyle (there is an eclipse plugin, and an ant task that produces reports. You can 'break' the build if you want).

http://checkstyle.sourceforge.net/

BraveSirFoobar
A: 

I'd like to plug eclipse into checkstyle - and use the eclipse style preferences - not the checkstyle preferences in eclipse.

hawkeye