title: Groovy - formatting boolean expressions
body: <p>I have just tried to write my first ever Groovy script and noticed that the following method does not work as I would expect it to (at first glance at least).</p>
  
  <pre><code>boolean isComment(String line)
  {
      line = line.trim();
      return
          line.startsWith('//') ||
          line.startsWith('/*') ||
          line.startsWith('*') ||
          line.startsWith('*/');
  }
  </code></pre>
  
  <p>I realized that (due to the fact that semicolons are optional in Groovy) the method body is in fact:</p>
  
  <ol>
  <li>An assignment to the "line" variable.</li>
  <li>An empty return statement (!), which evaluates to and returns false.</li>
  <li>Four other (non-reachable) independent statements.</li>
  </ol>
  
  <p>To me, the inability to format expressions in order to improve readability seems as quite a drawback.</p>
  
  <p>What is the correct Groovy way to express such a method?</p>