Hi Raquel,

kind of true. Said otherwise: re-formatting is most of the time
considered as noise so it should only be applied to the changed code
and not the code around or the files not modified at all and it should
be done before the commit IMO.

Starting from scratch it means you can enforce rules easily with any
of the tools we spoke about but starting from a big codebase it needs
some more precautions.


Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <[email protected]>:
> Hi,
>
> Walkmod allows to use a formatter, but I think that the problems that
> people find are as follows:
>
> - We don't want a big commit with all the source files reformatted.
>
> - We don't want to apply the formatter incrementally to avoid a set of
> commits just for formatting issues.
>
> In fact i have found the same problems in Guava. Google is not following
> its own formatter style.
>
> Let me know if I am wrong,
>
> Regards
> El 19/11/2015 18:45, "cchacin" <[email protected]> escribió:
>
>> I use the  Google Style Guide
>> <http://google.github.io/styleguide/javaguide.html>   (with some
>> modification like 4 spaces) in this way:
>>
>> 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.
>>
>>
>>
>> -----
>> 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.
>>

Reply via email to