File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- PROJECT_DIR=" $( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) /.."
5+ PROJECT_DIR=" $( dirname " $( readlink -f " ${BASH_SOURCE[0]} " ) " ) /.."
66
7- MD_FILES=$( find ${PROJECT_DIR} -name " *.md" -not -path " ${PROJECT_DIR} /tests/*" )
8-
9- for file in ${MD_FILES[@]} ; do
10- python ${PROJECT_DIR} /tests/syntax_lint.py ${file} > /dev/null
7+ # Use the `-print0` option to handle spaces safely, and while-read loop:
8+ find " ${PROJECT_DIR} " \
9+ -name " *.md" \
10+ -not -path " ${PROJECT_DIR} /tests/*" \
11+ -print0 |
12+ while IFS= read -r -d ' ' file
13+ do
14+ python " ${PROJECT_DIR} /tests/syntax_lint.py" " ${file} " > /dev/null
1115done
1216
1317echo " - Syntax lint tests on MD files passed successfully"
1418
15- flake8 --max-line-length=100 . && echo " - PEP8 Passed"
19+ flake8 --max-line-length=100 . && echo " - PEP8 Passed"
You can’t perform that action at this time.
0 commit comments