mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
chore: lint .env file templates (#3507)
This commit is contained in:
parent
be27ac0e69
commit
066076b157
5
.github/workflows/style.yml
vendored
5
.github/workflows/style.yml
vendored
|
@ -24,11 +24,14 @@ jobs:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Python dependencies
|
- name: Python dependencies
|
||||||
run: pip install ruff
|
run: pip install ruff dotenv-linter
|
||||||
|
|
||||||
- name: Ruff check
|
- name: Ruff check
|
||||||
run: ruff check ./api
|
run: ruff check ./api
|
||||||
|
|
||||||
|
- name: Dotenv check
|
||||||
|
run: dotenv-linter ./api/.env.example ./web/.env.example
|
||||||
|
|
||||||
- name: Lint hints
|
- name: Lint hints
|
||||||
if: failure()
|
if: failure()
|
||||||
run: echo "Please run 'dev/reformat' to fix the fixable linting errors."
|
run: echo "Please run 'dev/reformat' to fix the fixable linting errors."
|
||||||
|
|
|
@ -10,3 +10,11 @@ fi
|
||||||
|
|
||||||
# run ruff linter
|
# run ruff linter
|
||||||
ruff check --fix ./api
|
ruff check --fix ./api
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user