chore: lint .env file templates (#3507)

pull/3533/head
Bowen Liang 2 years ago committed by GitHub
parent be27ac0e69
commit 066076b157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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."

@ -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

Loading…
Cancel
Save