You are viewing a plain text version of this content. The canonical link for it is here.
Posted to droids-dev@incubator.apache.org by "Eugen Paraschiv (JIRA)" <ji...@apache.org> on 2011/02/15 21:57:57 UTC

[jira] Created: (DROIDS-123) Better formatting consistency for the Droids codebase

Better formatting consistency for the Droids codebase 
------------------------------------------------------

                 Key: DROIDS-123
                 URL: https://issues.apache.org/jira/browse/DROIDS-123
             Project: Droids
          Issue Type: Improvement
          Components: core
    Affects Versions: 0.0.2
            Reporter: Eugen Paraschiv
             Fix For: 0.0.2


There is a severe lack of consistency regarding formatting in the codebase. 
Example - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
public T next() {
and cases where they are not: 
public void clear()
  {

A very simple solution for this is using the standard Eclipse (or Sun) formatter to provide a level of consistency. 
A better solution is to commit a formatter along with the code (as it is standard practice).  

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Eugen Paraschiv (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugen Paraschiv updated DROIDS-123:
-----------------------------------

    Description: 
The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
Examples: 
1. braces
- SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
public T next() {
and cases where they are not: 
public void clear()
  {

2. whitespace 
- sometimes there is a whitespace between a 'for' and the '('
for (
and sometimes there is not: 
for(

The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

  was:
There is a severe lack of consistency regarding formatting in the codebase. 
Example - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
public T next() {
and cases where they are not: 
public void clear()
  {

A very simple solution for this is using the standard Eclipse (or Sun) formatter to provide a level of consistency. 
A better solution is to commit a formatter along with the code (as it is standard practice).  


> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Bertil Chapuis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004455#comment-13004455 ] 

Bertil Chapuis commented on DROIDS-123:
---------------------------------------

I agree, in my opinion we may even adopt a more common code convention. I think by default most ide (eclipse, netbeans and intelliJ) follow approximately the same practices: braces on the line of the class or statement definition; 4 spaces for the indentation; etc.

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123_step1_v1.patch
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Eugen Paraschiv (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004496#comment-13004496 ] 

Eugen Paraschiv commented on DROIDS-123:
----------------------------------------

I fully agree. I will continue providing patches under this issue after which we can start looking and documenting clear code conventions. Thanks. 

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123_step1_v1.patch
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008411#comment-13008411 ] 

Thorsten Scherler commented on DROIDS-123:
------------------------------------------

The problem to change the formating now is that most of the patches that are still open will fail to apply. IMO it would make sense to run the formating tool once we create the trunk again and use a default settings.xml for eclipse for the formating.

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch, eclipse-java-profile.xml
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008594#comment-13008594 ] 

Otis Gospodnetic commented on DROIDS-123:
-----------------------------------------

+1.  Massive cosmetic patches will break pretty much all existing patches, unless those patches are applied with:

       -l  or  --ignore-whitespace
          Match  patterns loosely, in case tabs or spaces have been munged in your files.  Any sequence of one or more blanks in the patch file matches any sequence in the original file, and sequences of blanks at the ends of lines
          are ignored.  Normal characters must still match exactly.  Each line of the context must still match a line in the original file.

But I think even then things will break if cosmetic changes go beyond simple spacing changes.


> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch, eclipse-java-profile.xml
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Bertil Chapuis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertil Chapuis updated DROIDS-123:
----------------------------------

    Attachment: DROIDS-123-introducing-jalopy.patch

I just had a look at how log4j is using jalopy to specify coding guidelines and format its code. The following patch is compatible with the current Droids coding convention and the results with mvn jalopy:format are quite good.

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Scherler updated DROIDS-123:
-------------------------------------

    Attachment: eclipse-java-profile.xml

example config

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch, eclipse-java-profile.xml
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Eugen Paraschiv (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugen Paraschiv updated DROIDS-123:
-----------------------------------

    Attachment: DROIDS-123_step1_v1.patch

I'm attaching the first step of this process - the Eclipse formatter (in a new directory) and the formatting applied only to the tests in droids-core. 
Any feedback on this first proposal is appreciated. 
Thanks. 

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123_step1_v1.patch
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450724#comment-13450724 ] 

Tobias Rübner commented on DROIDS-123:
--------------------------------------

We should use the latest release to perform this action now.
Many patches provided in Jira are already outdated and can not be applied without changing the patch.
                
> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.2.0
>            Reporter: Eugen Paraschiv
>            Assignee: Tobias Rübner
>             Fix For: 0.3.0
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch, eclipse-java-profile.xml
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Richard Frovarp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Frovarp updated DROIDS-123:
-----------------------------------

    Fix Version/s:     (was: 0.2.0)
                   0.3.0
    
> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.2.0
>            Reporter: Eugen Paraschiv
>             Fix For: 0.3.0
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch, eclipse-java-profile.xml
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Tobias Rübner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Rübner reassigned DROIDS-123:
------------------------------------

    Assignee: Tobias Rübner
    
> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.2.0
>            Reporter: Eugen Paraschiv
>            Assignee: Tobias Rübner
>             Fix For: 0.3.0
>
>         Attachments: DROIDS-123-introducing-jalopy.patch, DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch, eclipse-java-profile.xml
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DROIDS-123) Better formatting consistency for the Droids codebase

Posted by "Eugen Paraschiv (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DROIDS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugen Paraschiv updated DROIDS-123:
-----------------------------------

    Attachment: DROIDS-123_step2_v1.patch

This is the next patch under this umbrella issue. 

> Better formatting consistency for the Droids codebase 
> ------------------------------------------------------
>
>                 Key: DROIDS-123
>                 URL: https://issues.apache.org/jira/browse/DROIDS-123
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.2
>            Reporter: Eugen Paraschiv
>             Fix For: 0.0.2
>
>         Attachments: DROIDS-123_step1_v1.patch, DROIDS-123_step2_v1.patch
>
>
> The formatting in droids should effectively be the same as the standard Java Conventions build in Eclipse formatter. However, the are multiple formatting inconsistencies in the droids codebas. 
> Examples: 
> 1. braces
> - SimpleTaskQueue - even in the same class, there are cases where the opening braces are on the same line as the method signature: 
> public T next() {
> and cases where they are not: 
> public void clear()
>   {
> 2. whitespace 
> - sometimes there is a whitespace between a 'for' and the '('
> for (
> and sometimes there is not: 
> for(
> The proposal to deal with this is to start with the Java build in formatter in Eclipse (with a few minor changes), and format the entire droids codebase - the changes should be minor in most cases. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira