Skip to content

Commit

Permalink
[LINT] Improve robustness in task_lint.sh logic (apache#3315)
Browse files Browse the repository at this point in the history
The existing RAT ASF license auditing logic ignores any failure in the
shell pipeline rather than just the exit code of the final grep.
Adjust the logic such that failure of the various tools in the
pipeline are not elided away.
  • Loading branch information
mshawcroft authored and Wei Chen committed Jun 26, 2019
1 parent a2864a8 commit 8a08651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/scripts/task_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ echo "Check file types..."
python3 tests/lint/check_file_type.py

echo "Check ASF license header..."
java -jar /bin/apache-rat.jar -E tests/lint/rat-excludes -d . |grep "== File" > /tmp/$$.apache-rat.txt || true
java -jar /bin/apache-rat.jar -E tests/lint/rat-excludes -d . | (grep "== File" > /tmp/$$.apache-rat.txt || true)
if grep --quiet -E "File" /tmp/$$.apache-rat.txt; then
echo "Need to add ASF header to the following files."
echo "----------------File List----------------"
Expand Down

0 comments on commit 8a08651

Please sign in to comment.