[ 
https://issues.apache.org/jira/browse/GEODE-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843585#comment-15843585
 ] 

ASF GitHub Bot commented on GEODE-2381:
---------------------------------------

GitHub user galen-pivotal opened a pull request:

    https://github.com/apache/geode/pull/368

    [GEODE-2381] make complex enums not look terrible.

    * Change the style XML file to insert a line break after each constant
      of an enum.
    
    There may be a better way to do this and allow simple enums to be all on
    one line, but this looks better than what we have to me.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/galen-pivotal/incubator-geode 
feature/GEODE-2381

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/geode/pull/368.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #368
    
----
commit 64039a80d6d73b155c892f96ea4a96fedda6def2
Author: Galen O'Sullivan <gosulli...@pivotal.io>
Date:   2017-01-27T22:19:49Z

    [GEODE-2381] spotless: line break on enum constants.
    
    * Change the style XML file to insert a line break after each constant
      of an enum.
    * This commit is just the style file change; spotless will be applied
      next.
    
    There may be a better way to do this and allow simple enums to be all on
    one line, but this looks better to me.

commit d98a656b0c0c691a17b8a61d0f13643b3e075308
Author: Galen O'Sullivan <gosulli...@pivotal.io>
Date:   2017-01-27T22:21:01Z

    [GEODE-2381] Apply spotless to fix enums
    
    and nothing else in this commit.

----


> Make enums not get so mangled by Spotless
> -----------------------------------------
>
>                 Key: GEODE-2381
>                 URL: https://issues.apache.org/jira/browse/GEODE-2381
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Galen O'Sullivan
>
> Perhaps the worst example is in {{CacheXMLVersion}}:
> {code}
> GEMFIRE_3_0(CacheXml.VERSION_3_0, CacheXml.PUBLIC_ID_3_0, 
> CacheXml.SYSTEM_ID_3_0, null,
>     null), GEMFIRE_4_0(CacheXml.VERSION_4_0, CacheXml.PUBLIC_ID_4_0, 
> CacheXml.SYSTEM_ID_4_0, null,
>         null), GEMFIRE_4_1(CacheXml.VERSION_4_1, CacheXml.PUBLIC_ID_4_1, 
> CacheXml.SYSTEM_ID_4_1,
>             null, null), GEMFIRE_5_0(CacheXml.VERSION_5_0, 
> CacheXml.PUBLIC_ID_5_0,
>                 CacheXml.SYSTEM_ID_5_0, null, null), 
> GEMFIRE_5_1(CacheXml.VERSION_5_1,
>                     CacheXml.PUBLIC_ID_5_1, CacheXml.SYSTEM_ID_5_1, null, 
> null), GEMFIRE_5_5(
>                         CacheXml.VERSION_5_5, CacheXml.PUBLIC_ID_5_5, 
> CacheXml.SYSTEM_ID_5_5,
>                         null, null), GEMFIRE_5_7(CacheXml.VERSION_5_7, 
> CacheXml.PUBLIC_ID_5_7,
>                             CacheXml.SYSTEM_ID_5_7, null, null), 
> GEMFIRE_5_8(CacheXml.VERSION_5_8,
>                                 CacheXml.PUBLIC_ID_5_8, 
> CacheXml.SYSTEM_ID_5_8, null,
>                                 null), GEMFIRE_6_0(CacheXml.VERSION_6_0, 
> CacheXml.PUBLIC_ID_6_0,
>                                     CacheXml.SYSTEM_ID_6_0, null, null), 
> GEMFIRE_6_1(
>                                         CacheXml.VERSION_6_1, 
> CacheXml.PUBLIC_ID_6_1,
>                                         CacheXml.SYSTEM_ID_6_1, null, null), 
> GEMFIRE_6_5(
>                                             CacheXml.VERSION_6_5, 
> CacheXml.PUBLIC_ID_6_5,
>                                             CacheXml.SYSTEM_ID_6_5, null, 
> null), GEMFIRE_6_6(
>                                                 CacheXml.VERSION_6_6, 
> CacheXml.PUBLIC_ID_6_6,
>                                                 CacheXml.SYSTEM_ID_6_6, null, 
> null), GEMFIRE_7_0(
>                                                     CacheXml.VERSION_7_0, 
> CacheXml.PUBLIC_ID_7_0,
>                                                     CacheXml.SYSTEM_ID_7_0, 
> null,
>                                                     null), 
> GEMFIRE_8_0(CacheXml.VERSION_8_0,
>                                                         
> CacheXml.PUBLIC_ID_8_0,
>                                                         
> CacheXml.SYSTEM_ID_8_0, null,
>                                                         null), 
> GEMFIRE_8_1(CacheXml.VERSION_8_1,
>                                                             null, null,
>                                                             
> CacheXml.SCHEMA_8_1_LOCATION,
>                                                             
> CacheXml.GEMFIRE_NAMESPACE),
> {code}
> I'd love to just format these one per line. This can be done by changing a 
> single line in the Spotless eclipse formatter xml file (I'll put up a PR in 
> just a minute).
> I'm not sure how attached we are to using {{eclipse-java-google-style.xml}} 
> in the same format as upstream (where did it come from exactly?). I also 
> noticed that Google has [their own 
> tool|https://github.com/google/google-java-format] for formatting text. 
> Probably what we have is fine for now, and this modification will make it 
> better.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to