ConceptPortal-public/scripts/dev/RunLint.ps1

26 lines
537 B
PowerShell
Raw Normal View History

2024-11-20 21:40:59 +03:00
# Run linters
$backend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\backend"
2024-11-20 21:40:59 +03:00
$frontend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\frontend"
function RunLinters() {
2024-11-20 21:40:59 +03:00
LintBackend
LintFrontend
}
2024-11-20 21:40:59 +03:00
function LintBackend() {
$pylint = "$backend\venv\Scripts\pylint.exe"
$mypy = "$backend\venv\Scripts\mypy.exe"
Set-Location $backend
2023-09-11 17:56:32 +03:00
$env:DJANGO_SETTINGS_MODULE = "project.settings"
& $pylint project apps
& $mypy project apps
}
2024-11-20 21:40:59 +03:00
function LintFrontend() {
Set-Location $frontend
& npm run lint
}
RunLinters