2015-11-19 9:29 GMT-08:00 cchacin <[email protected]>: > I use the Google Style Guide > <http://google.github.io/styleguide/javaguide.html> (with some > modification like 4 spaces) in this way: >
we have a style: https://github.com/apache/tomee/blob/master/src/main/style/checkstyle.xml ... ok ok it is light but I guess it matches the will of most of us (+ historical changesets) so can't be too rigid. > For Eclipse: > You can configure the formatter with this file: > https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml > > For IntelliJ: > You can configure the formatter with this file > https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml > Or use the eclipse formatter plugin > > For Netbeans: use the eclipse formatter plugin > > And there is a maven plugin > https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html > > One suggestion can be to use a pre-commit hook or a webhook in your VCS, I > never use walkmod before but probably we can configure a hook with walkmod > also. I think the most important part is to have the common configuration > file wih the desired styles. > Pitfall there can be you still create conflicts since the pushed code is not the one you have, maybe better to just rely on a local plugin preventing the build. wdyt? > > > ----- > Carlos Chacin > http://github.com/cchacin > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html > Sent from the TomEE Dev mailing list archive at Nabble.com.
