dsccommunity / dsccommunity/ComputerManagementDsc

chore: Add VS Code recommended extensions, settings, and build tasks

Open
#465 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

chore
Dominant language
PowerShell
Stars
338
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Summary

The repository has no .vscode/ folder. Add the standard VS Code workspace configuration files used across DSC Community modules (aligned with SqlServerDsc) to provide a consistent developer experience for all contributors.


Files to create

.vscode/extensions.json

Recommended extensions for contributors:

{
    "recommendations": [
        "davidanson.vscode-markdownlint",
        "pspester.pester-test",
        "ms-vscode.powershell",
        "streetsidesoftware.code-spell-checker"
    ]
}

.vscode/tasks.json

Replace the minimal workspace tasks with a comprehensive set aligned to the build.yaml workflow tasks. All tasks should use ./build.ps1 (not &${cwd}/build.ps1) and target pwsh on Linux/macOS and powershell.exe on Windows.

Tasks to include:

Label Build group Command Notes
noop ./build.ps1 -Tasks noop Resolves and restores dependencies; run once per pwsh session before testing
build build (default) ./build.ps1 -AutoRestore -Tasks build Full module build
test test (default) ./build.ps1 -Tasks noop; Invoke-Pester -Path './tests/Unit' -Output Detailed Unit tests without coverage
test-with-coverage test ./build.ps1 -Tasks noop; Invoke-Pester -Path './tests/Unit' -Output Detailed with coverage enabled Unit tests with code coverage
hqrmtest ./build.ps1 -AutoRestore -Tasks hqrmtest -CodeCoverageThreshold 0 High Quality Resource Module (HQRM) QA tests

Each task should include:

  • A problemMatcher for surfacing Pester failures in the VS Code Problems panel
  • "panel": "new" for build; "panel": "dedicated" for test tasks
  • "focus": true and "reveal": "always" on presentation

Use the tasks.json from SqlServerDsc as the reference and adapt the test task commands for this module's test path structure (tests/Unit/DSCResources/ and tests/Unit/Classes/ instead of tests/Unit/Public/, tests/Unit/Private/, etc.).


.vscode/settings.json

Workspace settings to enforce consistent formatting and tooling. Base on the SqlServerDsc settings.json and adapt:

  • PowerShell code formattingopenBraceOnSameLine: false, newLineAfterOpenBrace: true, 4-space indent, preset: Custom etc.
  • PSScriptAnalyzerpowershell.scriptAnalysis.settingsPath pointing to .vscode/analyzersettings.psd1
  • Pester integrationpester.testFilePath patterns covering tests/Unit/**/*.Tests.ps1 and tests/QA/*.Tests.ps1; pester.pesterModulePath: ./output/RequiredModules/Pester; pester.runTestsInNewProcess: true; powershell.pester.useLegacyCodeLens: false
  • GitHub Copilotgithub.copilot.chat.codeGeneration.useInstructionFiles: true
  • Editorfiles.trimTrailingWhitespace: true, files.insertFinalNewline: true, files.trimFinalNewlines: true
  • cSpellcSpell.dictionaries: ["powershell"] with project-specific word list cleaned of SQL Server terms; add ComputerManagementDsc-relevant words
  • Markdownlintmarkdownlint.ignore: [".github/CODEOWNERS"]
  • Terminal profiles — default to pwsh on Linux/macOS/Windows for consistent behavior with Copilot agent terminal

Remove all SQL Server–specific cSpell.words and cSpell.ignoreRegExpList entries from the SqlServerDsc source.


.vscode/analyzersettings.psd1

PSScriptAnalyzer settings file for the PowerShell extension's inline analysis. Base on the SqlServerDsc analyzersettings.psd1 and adapt:

  • CustomRulePath — keep ./output/RequiredModules/DscResource.AnalyzerRules and ./output/RequiredModules/Indented.ScriptAnalyzerRules; remove the SqlServerDsc-specific ./tests/QA/AnalyzerRules/SqlServerDsc.AnalyzerRules.psm1 entry (or replace with the equivalent path if this repo has custom analyzer rules)
  • IncludeDefaultRules: $true
  • Keep the full IncludeRules list of DSC Community standard rules (both default PSScriptAnalyzer rules and DSC-specific rules)
  • Keep the Rules hashtable for PSUseConsistentWhitespace, PSPlaceOpenBrace, PSPlaceCloseBrace, PSAlignAssignmentStatement

Acceptance criteria

  • .vscode/extensions.json created with the four recommended extensions
  • .vscode/tasks.json created with noop, build, test, test-with-coverage, and hqrmtest tasks
  • .vscode/tasks.json test task paths reflect this repo's unit test folder layout (tests/Unit/DSCResources/, tests/Unit/Classes/)
  • .vscode/settings.json created with PowerShell formatting, Pester, cSpell, Copilot instruction files, and terminal profile settings
  • .vscode/settings.json contains no SQL Server–specific words or patterns
  • .vscode/analyzersettings.psd1 created with DSC Community analyzer rules; no SqlServerDsc-specific custom rule path

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading this repository's build.yaml and comparing the referenced SqlServerDsc .vscode files. Create extensions.json, tasks.json, settings.json, and analyzersettings.psd1 with ComputerManagementDsc paths and terminology, then verify each acceptance criterion, including task coverage and removal of SQL Server-specific settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, vscode
Domain
build-system, developer-experience, testing-qa, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.