Skip to content

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

Description

@PlagueHO

Summary

Add the standard VS Code workspace configuration files to this repository, tailored for a base class library rather than a DSC resource module. Reference implementation: SqlServerDsc .vscode/.

Files to create

.vscode/extensions.json

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

.vscode/tasks.json

Label Build group Command
noop ./build.ps1 -Tasks noop
build build (default) ./build.ps1 -AutoRestore -Tasks build
test test (default) ./build.ps1 -Tasks noop; Invoke-Pester -Path './tests/Unit' -Output Detailed
test-with-coverage test Unit tests with coverage
hqrmtest ./build.ps1 -AutoRestore -Tasks hqrmtest -CodeCoverageThreshold 0

Important: Always run tests in a new pwsh session after modifying class files (source/Classes/). Consider adding a task label comment noting this requirement.

Include problemMatcher, presentation settings, and per-platform shell config. Reference: SqlServerDsc tasks.json. Adapt test paths to tests/Unit/Classes/.

.vscode/settings.json

Based on SqlServerDsc settings.json:

  • PowerShell formatting, PSScriptAnalyzer path, Pester integration, useInstructionFiles: true
  • pester.testFilePath patterns for tests/Unit/Classes/ and tests/QA/
  • cSpell with powershell dictionary and DscResource.Base-relevant words (no SQL Server terms)
  • Terminal profiles defaulting to pwsh

.vscode/analyzersettings.psd1

Based on SqlServerDsc analyzersettings.psd1 — remove SqlServerDsc-specific custom rule path. Keep DscResource.AnalyzerRules and Indented.ScriptAnalyzerRules.

Acceptance criteria

  • .vscode/extensions.json created
  • .vscode/tasks.json created; test paths reflect tests/Unit/Classes/
  • .vscode/settings.json created with no SQL Server–specific content
  • .vscode/analyzersettings.psd1 created

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions