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?  
    



---

Reply via email to