2024-01-12 12:34:01 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2024-02-06 13:21:13 +08:00
|
|
|
# python style checks rely on `ruff` in path
|
|
|
|
if ! command -v ruff &> /dev/null; then
|
|
|
|
echo "Installing Ruff ..."
|
|
|
|
pip install ruff
|
2024-01-12 12:34:01 +08:00
|
|
|
fi
|
2024-02-06 13:21:13 +08:00
|
|
|
|
|
|
|
# run ruff linter
|
2024-06-17 10:04:28 +08:00
|
|
|
ruff check --fix ./api
|
2024-04-16 19:53:54 +08:00
|
|
|
|
|
|
|
# env files linting relies on `dotenv-linter` in path
|
|
|
|
if ! command -v dotenv-linter &> /dev/null; then
|
|
|
|
echo "Installing dotenv-linter ..."
|
|
|
|
pip install dotenv-linter
|
|
|
|
fi
|
|
|
|
|
|
|
|
dotenv-linter ./api/.env.example ./web/.env.example
|