2023-03-25 12:05:56 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
2025-03-26 21:19:33 -01:00
|
|
|
PROJECT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/.."
|
2023-03-25 12:05:56 +01:00
|
|
|
|
2025-03-26 21:19:33 -01:00
|
|
|
# Use the `-print0` option to handle spaces safely, and while-read loop:
|
|
|
|
|
find "${PROJECT_DIR}" \
|
|
|
|
|
-name "*.md" \
|
|
|
|
|
-not -path "${PROJECT_DIR}/tests/*" \
|
|
|
|
|
-print0 |
|
|
|
|
|
while IFS= read -r -d '' file
|
|
|
|
|
do
|
|
|
|
|
python "${PROJECT_DIR}/tests/syntax_lint.py" "${file}" > /dev/null
|
2023-03-25 12:05:56 +01:00
|
|
|
done
|
|
|
|
|
|
2023-08-25 04:02:53 +08:00
|
|
|
echo "- Syntax lint tests on MD files passed successfully"
|
2023-03-25 12:05:56 +01:00
|
|
|
|
2025-03-26 21:19:33 -01:00
|
|
|
flake8 --max-line-length=100 . && echo "- PEP8 Passed"
|