Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: lint .env file templates (#3507)

Bowen Liang066076b1575e
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index c704ac1f7c5..bdbc22b489b 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -24,11 +24,14 @@ jobs:
python-version: '3.10'
- name: Python dependencies
- run: pip install ruff
+ run: pip install ruff dotenv-linter
- name: Ruff check
run: ruff check ./api
+ - name: Dotenv check
+ run: dotenv-linter ./api/.env.example ./web/.env.example
+
- name: Lint hints
if: failure()
run: echo "Please run 'dev/reformat' to fix the fixable linting errors."
diff --git a/dev/reformat b/dev/reformat
index 864f9b4b02b..ebee1efb40a 100755
--- a/dev/reformat
+++ b/dev/reformat
@@ -10,3 +10,11 @@ fi
# run ruff linter
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