mirror of
https://github.com/bregman-arie/devops-exercises.git
synced 2026-02-04 23:59:11 +00:00
* Update run_ci.sh * fix flake8 warning s3-lambda.py 1. Two blank lines before the function definition (E302). 2. Four-space indentation (E111, E114). 3. Spaces around operators (E225). 4. Correct alignment for comments.
20 lines
495 B
Bash
Executable File
20 lines
495 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/.."
|
|
|
|
# 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
|
|
done
|
|
|
|
echo "- Syntax lint tests on MD files passed successfully"
|
|
|
|
flake8 --max-line-length=100 . && echo "- PEP8 Passed"
|