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

ASF GitHub Bot commented on METRON-1438:
----------------------------------------

Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/metron/pull/920#discussion_r165653517
  
    --- Diff: 
metron-stellar/stellar-common/src/test/java/org/apache/metron/stellar/dsl/functions/ShellFunctionsTest.java
 ---
    @@ -40,8 +45,8 @@
       );
     
       Context context = new Context.Builder()
    -            .with(Context.Capabilities.SHELL_VARIABLES , () -> variables)
    -            .build();
    +            .with(Context.Capabilities.SHELL_VARIABLES , () -> 
variables).build();
    --- End diff --
    
    I am actually interested in what direction as a project we should be taking 
with these types of fluent, chained statements.  I run across this all the time 
and I want to know the 'right' way that I should be doing it for the project.
    
    IMHO, the way it was (separated by a line break) is more readable.  
Meaning, a long set of chained statements should be separated by line breaks.  
For example...
    ```
          result = new ProfileMeasurement()
                  .withProfileName(profileName)
                  .withEntity(entity)
                  .withGroups(groups)
                  .withPeriod(period)
                  .withProfileValue(profileValue)
                  .withTriageValues(triageValues)
                  .withDefinition(definition);
    ```
    
    But, of course, in terms of code style my opinion doesn't matter.  It is 
all about our style guidelines. 
     What does the Google code style guidelines say?   
    
    Doesn't 
[this](https://google.github.io/styleguide/javaguide.html#s4.5.1-line-wrapping-where-to-break)
 support what I have said above about line breaks in this case?  
    



> STELLAR: Move shell functions to common from metron-management
> --------------------------------------------------------------
>
>                 Key: METRON-1438
>                 URL: https://issues.apache.org/jira/browse/METRON-1438
>             Project: Metron
>          Issue Type: Sub-task
>            Reporter: Otto Fowler
>            Assignee: Otto Fowler
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to