2024-11-20 21:40:47 +03:00
|
|
|
# Run linters
|
|
|
|
|
2024-06-07 20:17:03 +03:00
|
|
|
$backend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\backend"
|
2024-11-20 21:40:47 +03:00
|
|
|
$frontend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\frontend"
|
2024-06-07 20:17:03 +03:00
|
|
|
|
|
|
|
function RunLinters() {
|
2024-11-20 21:40:47 +03:00
|
|
|
LintBackend
|
|
|
|
LintFrontend
|
2024-06-07 20:17:03 +03:00
|
|
|
}
|
|
|
|
|
2024-11-20 21:40:47 +03:00
|
|
|
function LintBackend() {
|
2024-06-07 20:17:03 +03:00
|
|
|
$pylint = "$backend\venv\Scripts\pylint.exe"
|
|
|
|
$mypy = "$backend\venv\Scripts\mypy.exe"
|
|
|
|
|
|
|
|
Set-Location $backend
|
|
|
|
$env:DJANGO_SETTINGS_MODULE = "project.settings"
|
|
|
|
& $pylint project apps
|
2024-12-04 14:52:20 +03:00
|
|
|
& $mypy project apps --show-traceback
|
2024-06-07 20:17:03 +03:00
|
|
|
}
|
|
|
|
|
2024-11-20 21:40:47 +03:00
|
|
|
function LintFrontend() {
|
|
|
|
Set-Location $frontend
|
|
|
|
& npm run lint
|
2025-03-02 21:21:34 +03:00
|
|
|
& npm run lint:playwright
|
2024-11-20 21:40:47 +03:00
|
|
|
}
|
|
|
|
|
2024-06-07 20:17:03 +03:00
|
|
|
RunLinters
|