incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian C <...@amham.net>
Subject Re: Source Normalization
Date Sat, 14 Sep 2013 03:17:40 GMT
Hi Svante,


On Fri, Sep 13, 2013 at 7:44 PM, Svante Schubert
<svante.schubert@gmail.com>wrote:

> When comparing the current sources of the ODF Toolkit with the sources
> with my branch by a text compare, I got a lot of "change noise",
> triggered by different indentation methods being used by Netbeans and
> Eclipse.
> Annoyed by this a long time, I gave it a try and tested successfully a
> Maven Tool that allowed the Source Normalization before building the
> sources.
>
>
> http://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/examples.html
>
> You may test it by adding it to your build plugins (behind the RAT) in
> the pom.xml:
> <plugin>
>     <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
>     <artifactId>maven-java-formatter-plugin</artifactId>
>     <version>0.4</version>
>      <configuration>
>         <lineEnding>LF</lineEnding>
>     </configuration>
>     <executions>
>         <execution>
>             <goals>
>                 <goal>format</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>
>
> After using this in both frameworks, I could far easier identify the
> differences.
>
> My plan is to add this to my branch and the project and do a commit
> without any further changes, end of next week.
>
> Any comments are welcome.
>

I tried the plugin and eventually discovered that in order to run it I
needed to enter the full goal...
mvn
com.googlecode.maven-java-formatter-plugin:maven-java-formatter-plugin:format

Which was not immediately obvious to me.

But looking at the changes via my SVN client I see just about everything
has changed.

Things like - from the GraphicsDocument class
    static final Resource EMPTY_GRAPHICS_DOCUMENT_RESOURCE = new
Resource(EMPTY_GRAPHICS_DOCUMENT_PATH);
goes to
    static final Resource EMPTY_GRAPHICS_DOCUMENT_RESOURCE = new Resource(
                        EMPTY_GRAPHICS_DOCUMENT_PATH);

Whilst I am not too fussed about it,is this what we want? Looks like it
must be applying a line length wrapping?

Do we need to figure out an agreed format? Are there some canned formats to
choose from?

Did you see as many changes? Checking in the reformat will affect almost
all files (3 skipped)?



>
> Kind regards,
> Svante
>



-- 
Cheers,

Ian C

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message