add lint full script

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-16 12:40:46 +02:00
parent e3c57af560
commit ce418265e2
5 changed files with 33 additions and 6 deletions
-3
View File
@@ -1,8 +1,5 @@
import os
import tempfile
from PIL import Image
from modules import shared, images, devices, errors, scripts_manager, scripts_postprocessing, infotext
from modules.logger import log
from modules.shared import opts
+1 -1
View File
@@ -46,7 +46,7 @@
"ty": ". venv/bin/activate && ty check --force-exclude",
"codespell": ". venv/bin/activate && codespell",
"compile": ". venv/bin/activate && python test/test-compile.py",
"full": "npm run lint && npm run codespell && npm run ty && npm run pyright"
"full": "npm run precommit && npm run eslint && npm run tsc && npm run ruff && npm run pylint && npm run codespell && npm run ty && npm run pyright"
},
"devDependencies": {
"@eslint/compat": "^2.1.0",
-1
View File
@@ -46,7 +46,6 @@ typing-extensions==4.16.0
sentencepiece==0.2.1
# lint
ty
ruff
pylint
pre-commit
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
run_test() {
local name="$1"
shift
echo "# Start: $name"
if "$@"; then
echo "# End: Pass $name"
return 0
else
echo "# End: Fail $name"
return 1
fi
}
echo "# SD.Next Static Checks"
echo "# Activate VENV"
source venv/bin/activate || true
echo "# Install toolkit"
pip install -U pre-commit ruff pylint codespell ty pyright || true
run_test "Precommit" npm run precommit || true
run_test "ESLint" npm run eslint || true
run_test "TypeScript" npm run tsc || true
run_test "Ruff" npm run ruff || true
run_test "Pylint" npm run pylint || true
run_test "Codespell" npm run codespell || true
run_test "Ty" npm run ty || true
run_test "Pyright" npm run pyright || true
echo "Done..."