title: How to lint all the files recursive while printing out only files that have an error?
body: <p>I want to lint all the files in the current (recursive) directory while printing out only files that have an error, and assign a variable to 1 to be used after the linting is finished.</p>
  
  <pre><code>#!/bin/bash
  
  lint_failed=0
  find . -path ./vendor -prune -o -name '*.php' | parallel -j 4 sh -c 'php -l {} || echo -e "[FAIL] {}" &amp;&amp; lint_failed=1';
  
  if [ "$lint_failed" -eq "1" ]; then
      exit 1
  fi
  </code></pre>
  
  <p><strong>Example</strong>:</p>
  
  <blockquote>
    <p>[FAIL] ./app/Model/Example.php</p>
  </blockquote>
  
  <p>The above code doesn't find any errors, but if I run <code>php -l ./app/Model/Example.php</code> an error is returned.</p>