Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[soa-pmc] Ensuring consistent formatting (breaks, spacing, tabs vs. spaces, ...)

Hey,

Whoever ported tabs to the electronic world should feel guilty.
Nevertheless, tabs are there. And some committers use tabs, some
don't. :)

In Winery, we distribute formatter templates and settings for "Java /
Editor / Save Actions".
There seems, however, no setting for space2tab conversion.

In Winery, we use the [AnyEdit tools] and distribute
`.settings/de.loskutov.anyedit.AnyEditTools.prefs` in the directories
of each Eclipse project. And we always use tabs. O:)

What do you do? How do you ensure that the code is consistently formatted?

[Stackoverflow] recommends using Checkstyle both in Eclipse and in the
Maven builds
An interesting idea is to [use the Eclipse code formatter in a command
line]. There is even a maven plugin for that:
https://code.google.com/p/maven-java-formatter-plugin/. [Apache CXF]
configures the workspace automatically using some magic :)

Cheers,

Oliver

  [AnyEdit tools]: http://andrei.gmxhome.de/anyedit/index.html
  [Stackoverflow]:
http://stackoverflow.com/questions/1955514/best-practices-for-code-formatting-on-large-projects
  [use the Eclipse code formatter in a command line]:
http://www.peterfriese.de/formatting-your-code-using-the-eclipse-code-formatter/
  [Apache CXF]:
http://cxf.apache.org/connecting-maven-eclipse-checkstyle-and-pmd.html


Back to the top