./lint.sh would silently exit (with exit code 1) if clang-format found formatting errors. This was caused set -eo pipefail which terminated the script after the first failure. Fixed with || :
Changed printf's to echo -e because printf caused colors to stop working.
Examples
Add a formatting error (for example, add a trailing space to libSetReplace/Parallelism.hpp:37).
Run ./lint.sh:
As one can see, colors are now produced, the errors from cpplint are still generated, and the non-zero exit code is returned.
Changes
This PR fixes two related issues:
./lint.sh
would silently exit (with exit code 1) ifclang-format
found formatting errors. This was causedset -eo pipefail
which terminated the script after the first failure. Fixed with|| :
printf
's toecho -e
becauseprintf
caused colors to stop working.Examples
libSetReplace/Parallelism.hpp:37
)../lint.sh
:cpplint
are still generated, and the non-zero exit code is returned.This change is