2024-01-12 12:34:01 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2024-07-09 23:06:23 +08:00
|
|
|
# style checks rely on commands in path
|
|
|
|
if ! command -v ruff &> /dev/null || ! command -v dotenv-linter &> /dev/null; then
|
|
|
|
echo "Installing linting tools (Ruff, dotenv-linter ...) ..."
|
|
|
|
poetry install -C api --only lint
|
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
|
|
|
|
2024-07-09 23:06:23 +08:00
|
|
|
# run dotenv-linter linter
|
2024-04-16 19:53:54 +08:00
|
|
|
dotenv-linter ./api/.env.example ./web/.env.example
|