ConceptPortal-public/scripts/dev/RunLint.ps1
Ivan 783bcdbb0e
Some checks failed
Backend CI / build (3.12) (push) Has been cancelled
R: Fix django dependencies
2024-12-04 14:52:41 +03:00

26 lines
554 B
PowerShell

# Run linters
$backend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\backend"
$frontend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\frontend"
function RunLinters() {
LintBackend
LintFrontend
}
function LintBackend() {
$pylint = "$backend\venv\Scripts\pylint.exe"
$mypy = "$backend\venv\Scripts\mypy.exe"
Set-Location $backend
$env:DJANGO_SETTINGS_MODULE = "project.settings"
& $pylint project apps
& $mypy project apps --show-traceback
}
function LintFrontend() {
Set-Location $frontend
& npm run lint
}
RunLinters