chore: use poetry for linter tools installation and bump Ruff from 0.4 to 0.5 (#6081)
This commit is contained in:
parent
757ceda063
commit
f9d00e0498
4 changed files with 33 additions and 33 deletions
15
dev/reformat
15
dev/reformat
|
|
@ -2,19 +2,14 @@
|
|||
|
||||
set -x
|
||||
|
||||
# python style checks rely on `ruff` in path
|
||||
if ! command -v ruff &> /dev/null; then
|
||||
echo "Installing Ruff ..."
|
||||
pip install ruff
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# run dotenv-linter linter
|
||||
dotenv-linter ./api/.env.example ./web/.env.example
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue