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
This commit is contained in:
Logan V 2019-03-13 12:07:40 -05:00
parent 059091261c
commit 86a697cf4b
1 changed files with 1 additions and 1 deletions

View File

@ -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