Кастомні перевірки
Кастомні перевірки додають до Quality Hub довільні команди проєкту.
Налаштування
"devManager.quality.customChecks": [ { "label": "lint", "script": "lint", "type": "script" }, { "label": "typecheck", "script": "typecheck", "type": "script" }, { "label": "build", "script": "build", "type": "script" }, { "label": "format", "script": "format:check", "type": "script" }, { "label": "migrations", "script": "prisma migrate status", "type": "command" }]Типи
| Тип | Поведінка |
|---|---|
"script" | Через менеджер пакетів: npm run <script>, pnpm run <script> тощо |
"command" | Значення script виконується як shell-команда з кореня проєкту |
UI
Кнопки на панелі Quality Hub:
+— додати перевірку (label + скрипт/команда)-— видалити зі списку
Код виходу
0→ pass- ненульовий → fail
Приклади
Go
[ { "label": "go vet", "script": "go vet ./...", "type": "command" }, { "label": "go test", "script": "go test ./...", "type": "command" }, { "label": "go build", "script": "go build ./...", "type": "command" }]Python
[ { "label": "flake8", "script": "flake8 .", "type": "command" }, { "label": "mypy", "script": "mypy src", "type": "command" }, { "label": "pytest", "script": "pytest --tb=short", "type": "command" }]Rust
[ { "label": "cargo check", "script": "cargo check", "type": "command" }, { "label": "cargo test", "script": "cargo test", "type": "command" }, { "label": "cargo clippy", "script": "cargo clippy -- -D warnings", "type": "command" }]Laravel (PHP)
[ { "label": "phpstan", "script": "vendor/bin/phpstan analyse", "type": "command" }, { "label": "pint", "script": "vendor/bin/pint --test", "type": "command" }, { "label": "artisan migrate:status", "script": "php artisan migrate:status", "type": "command" }]