title: How to postpone to print an error until every execution
body: <p>Currently I iterate through every <code>.py</code> file in <code>/</code> directory. For each iteration, I call <code>pycodestyle</code> and exit as soon as I see the error. </p>
  
  <ol>
  <li><p>But I want to see all the error messages for every file even if any of file had an error before &lt;&lt; This helps developer to see which lines he/she should change in order to pass the test (linting).</p></li>
  <li><p>If no file prints an error, don't print error. &lt;&lt; This will be useful for my Jenkins pipeline.</p>
  
  <pre><code>for file in $(find /-type d -name test -prune -o -type f -name '*.py' -print); do
      filename=$(basename $file)
      if [[ $filename != "__init__.py" ]] ; then
          echo "$file"
          pycodestyle "${file}" || exit 1 &lt;&lt;&lt; This causes an error.
                     &lt;&lt; If it passes the linting, it doesn't exit. 
      fi
  done
  </code></pre></li>
  </ol>
  
  <p>My solution:</p>
  
  <p>Somehow I need a boolean local variable to show whether it prints error. At the end I can check the variable and returns exit or not. But I don't know how to implement this... Thanks!</p>