Skip to content

Commit c35ba68

Browse files
author
thk123
committed
Don't error if no errors are found
Previously, as we had set -e enabled, the final grep (filtering relevant errors) would fail if there were no errors to find. This failure was causing the script to exit with an error code (causing the CI to think the lint had failed). Now we ignore whether the grep fails or not.
1 parent 0e46795 commit c35ba68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/run_lint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ for file in $diff_files; do
7474
# Run the linting script and filter by the filter we've build
7575
# of all the modified lines
7676
# The errors from the linter go to STDERR so must be redirected to STDOUT
77-
result=`python scripts/cpplint.py $file 2>&1 | grep -E "$lint_grep_filter"`
77+
result=`python scripts/cpplint.py $file 2>&1 | { grep -E "$lint_grep_filter" || true; }`
7878

7979
# Providing some errors were relevant we print them out
8080
if [ "$result" ]

0 commit comments

Comments
 (0)