mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-02 03:07:59 +08:00
19 lines
413 B
Bash
Executable File
19 lines
413 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
# 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
|
|
fi
|
|
|
|
# run ruff linter
|
|
ruff check --fix ./api
|
|
|
|
# run ruff formatter
|
|
ruff format ./api
|
|
|
|
# run dotenv-linter linter
|
|
dotenv-linter ./api/.env.example ./web/.env.example
|