From 86a697cf4b7662666a3a19c1b95c2a2acc8e146b Mon Sep 17 00:00:00 2001 From: Logan V Date: Wed, 13 Mar 2019 12:07:40 -0500 Subject: [PATCH] Fix bashate xargs run Bashate does not fail for "E004 File did not end with a newline" properly unless the file is the last in the list when multiple check files are provided (as we do with xargs). Since the file order is random, if only 1 or 2 files are failing, this can cause very random linter failures. The solution is to use 'xargs -n1' to pass only 1 file to each bashate process. See also https://review.openstack.org/#/c/614542/ Change-Id: I2186795510c2327571e7631b45de8a112f4d4445 --- test-bashate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-bashate.sh b/test-bashate.sh index 9814a0a8..cd52c5dc 100755 --- a/test-bashate.sh +++ b/test-bashate.sh @@ -49,4 +49,4 @@ grep --recursive --binary-files=without-match \ --files-with-match '^.!.*\(ba\)\?sh$' \ --exclude-dir .tox \ --exclude-dir .git \ - "${WORKING_DIR}" | xargs bashate --error . --verbose --ignore=E003,E006,E040 + "${WORKING_DIR}" | xargs -n1 bashate --error . --verbose --ignore=E003,E006,E040