TemplateRepoFiles/_.vscode/tasks.json
|
{
// For more info about out the tasks.json format see: https://code.visualstudio.com/docs/editor/tasks "version": "2.0.0", "tasks": [ { "label": "Run all build tasks", "group": { "kind": "build", "isDefault": true }, "dependsOn": [ "Run PSScriptAnalyzer linter", "Run CSpell spell checker" ] }, { "label": "Run all test tasks", "group": { "kind": "test", "isDefault": true }, "dependsOn": [ "Run all Pester tests" ] }, { "label": "Run PSScriptAnalyzer linter", "type": "shell", "options": { "shell": { "executable": "pwsh", "args": [ "-NoProfile", "-Command" ] } }, "command": "Invoke-ScriptAnalyzer -Path . -Recurse -EnableExit", "group": "build", "presentation": { "reveal": "always", "panel": "dedicated", "clear": true, "group": "build" }, "problemMatcher": [ "$func-powershell-watch" ] }, { "label": "Run CSpell spell checker", "type": "shell", "options": { "shell": { "executable": "pwsh", "args": [ "-NoProfile", "-Command" ] } }, // If npx is not available, warn that Node.js is not installed. If we cannot run cspell, try to install and run it, and warn if we still cannot run it. "command": "try { & npx -v > $null } catch {}; if (-not $?) { Write-Warning 'Node.js is not installed, so cannot download and run npx cspell.' } else { try { & npx cspell . } catch {}; if (-not $?) { & npm install cspell; & npx cspell . }; if (-not $?) { Write-Warning 'There was a problem installing or running cspell' } }", "group": "build", "presentation": { "reveal": "always", "panel": "dedicated", "clear": true, "group": "build" }, "problemMatcher": [ "$func-powershell-watch" ] }, { "label": "Run all Pester tests", "type": "shell", "options": { "shell": { "executable": "pwsh", "args": [ "-NoProfile", "-Command" ] } }, "command": "Invoke-Pester -Configuration (New-PesterConfiguration @{ Output = @{ Verbosity = 'Detailed' }})", "group": "test", "presentation": { "reveal": "always", "panel": "dedicated", "clear": true }, "problemMatcher": [ "$func-powershell-watch" ] }, { "label": "Run Pester code coverage", "type": "shell", "options": { "shell": { "executable": "pwsh", "args": [ "-NoProfile", "-Command" ] } }, "command": "Invoke-Pester -Configuration (New-PesterConfiguration @{ Output = @{ Verbosity = 'Detailed' }; CodeCoverage = @{ Enabled = $true }})", "group": "test", "presentation": { "reveal": "always", "panel": "dedicated", "clear": true }, "problemMatcher": [ "$func-powershell-watch" ] }, { "label": "Test module manifest validity", "type": "shell", "options": { "shell": { "executable": "pwsh", "args": [ "-NoProfile", "-Command" ] } }, "command": "Get-ChildItem -Path ./src -Include *.psd1 -Recurse | Test-ModuleManifest", "group": "test", "presentation": { "reveal": "always", "panel": "dedicated", "clear": true }, "problemMatcher": [ "$func-powershell-watch" ] } ] } |