Skip to content

Add PowerShell completion playground#17

Merged
kjanat merged 8 commits intomasterfrom
powershell-completions
Apr 17, 2026
Merged

Add PowerShell completion playground#17
kjanat merged 8 commits intomasterfrom
powershell-completions

Conversation

@kjanat
Copy link
Copy Markdown
Owner

@kjanat kjanat commented Apr 16, 2026

Summary

  • add a Windows-friendly examples/pwsh-demo workspace with a pwsh-demo.cmd launcher, README install flow, example tests, and a native smoke:powershell script that exercises aliases, nested subcommands, root-surface defaults, hidden entries, and quoted enum values
  • fix PowerShell completion behavior so enum values complete while typing, inline --flag=value completions work, values after -- stop receiving flag suggestions, and accepted values are quoted when PowerShell would otherwise parse them incorrectly
  • align the documented install flow with real PowerShell behavior by switching docs and generated headers to Out-String | Invoke-Expression
  • relax the Bun support floor to >= 1.3 across package metadata, runtime support checks, docs, and runtime tests, and update the Windows launcher and workspace metadata needed for the new example
  • prepare the 2.1.0 release metadata by syncing package.json, deno.json, and CHANGELOG.md
  • replace stale CodeRabbit GOALS.md checks with repo-specific guards and document pwsh-demo in examples/AGENTS.md

Validation

  • bun run test -- src/core/completion/completion.test.ts
  • bun run test (in examples/pwsh-demo)
  • bun run smoke:powershell (in examples/pwsh-demo)

Add a Windows-friendly `pwsh-demo` workspace and document the
`Out-String` install flow so PowerShell completions can be exercised end
to end. Refresh local tooling config and workspace metadata to support
the new example and current tool versions.

Fixes #16
@kjanat kjanat self-assigned this Apr 16, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 16, 2026

Open in StackBlitz

bun add https://pkg.pr.new/@kjanat/dreamcli@17
npm i https://pkg.pr.new/@kjanat/dreamcli@17

commit: da4a137

@coderabbitai coderabbitai Bot added kind: feature New capability or product enhancement area: docs VitePress app, guides, reference pages, and docs UX area: completion Shell completion generation and parsing area: examples Runnable examples and walkthrough package labels Apr 16, 2026
@kjanat kjanat added the kind: bug Broken behavior or regression label Apr 16, 2026
@kjanat kjanat linked an issue Apr 16, 2026 that may be closed by this pull request
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 16, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
dreamcli 6f222d0 Commit Preview URL

Branch Preview URL
Apr 16 2026, 07:12 PM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

📝 Walkthrough

Add PowerShell completion playground; harden PowerShell completions, docs, tests, and release metadata

  • examples/pwsh-demo: add a PowerShell completion playground

    • New example CLI (examples/pwsh-demo/src/main.ts) exporting pwshDemo with root/default command, aliases, nested subcommands, enums, hidden command, and completion surface enabled.
    • Windows-friendly launcher and packaging: examples/pwsh-demo/pwsh-demo.cmd, examples/pwsh-demo/package.json, and examples/pwsh-demo/README.md with interactive "Try It" instructions.
    • Add automated PowerShell smoke test (examples/pwsh-demo/smoke-powershell.ps1) and Bun tests (examples/pwsh-demo/src/main.test.ts) that validate native launcher output matches direct completion output and exercise completion scenarios.
  • Fix PowerShell completion install flow and evaluation

    • Emit install-for-current-session instruction that pipes completions through Out-String before Invoke-Expression to match real PowerShell multiline behavior.
    • Align docs and tests: docs/guide/completions.md, src/core/completion/shells/powershell.ts, src/core/completion/completion.test.ts updated.
  • Correct PowerShell completion behavior

    • Treat active token as in-progress so partial enum values complete while typing; change token boundary logic to EndOffset -ge $CursorPosition.
    • Stop suggesting flags after the argument separator (--) by introducing AfterSeparator state and returning no completions when set.
    • Add formatting/escaping and prefix-matching helpers (_FormatCompletionValue, EscapeSingleQuotedStringContent, _MatchesCompletionPrefix) so emitted completion texts are valid PowerShell literals and prefix-matching works against both raw and formatted texts (handles spaces and single quotes).
    • Support inline --flag=value completions and ensure accepted values are quoted when PowerShell would otherwise parse them incorrectly.
    • Update/extend completion tests to assert prefix matching, separator behavior, quoting, and Out-String install step; tighten smoke test to fail on launcher/command errors before comparing outputs.
  • Tests & validation

    • Extend completion and runtime tests to reflect behavior changes and release sync guards; add smoke/pwsh demo tests.
    • Validation commands: bun run test -- src/core/completion/completion.test.ts, bun run test (in examples/pwsh-demo), bun run smoke:powershell (in examples/pwsh-demo).
  • Runtime, packaging & release metadata

    • Prepare 2.1.0 release: bump package/deno versions and CHANGELOG.md.
    • Relax Bun minimum support from 1.3.11 → 1.3 across src/runtime/support.ts, docs, package manifests, and test fixtures (tests updated to bun@1.3.12 where applicable).
    • Move vite into devDependencies and add top-level overrides for vitepress resolution.
  • Tooling, formatting, and repo guards

    • Normalize editor/formatter configs and bump plugins (.dprint.jsonc, biome.jsonc, .opencode/opencode.jsonc, .zed/settings.json).
    • Update pre-merge checks (.coderabbit.yaml) to repository-specific release/runtime/docs guards and disallow editing generated docs artifacts.
    • Add .gitattributes entry to enforce CRLF for .bat/.cmd files.
    • Update docs and support-matrix entries to reflect relaxed Bun requirement.
  • Changelog

    • Add v2.1.0 (2026-04-16) entry documenting the PowerShell playground, install guidance change, completion bug fixes, Bun support relaxation, and packaging/tooling updates.

Co-authored changes include PowerShell completion fixes, new example workspace and smoke tests, documentation alignment, Bun/runtime support relaxation, and multiple tooling/configuration normalizations.

Walkthrough

Normalized formatter/config JSONC formatting and bumped dprint plugins; relaxed Bun minimum to 1.3 and updated tests/docs; changed PowerShell install command to pipe through Out-String; added a PowerShell completion playground (CLI, examples, tests, smoke test) and related editor/build tweaks.

Changes

Cohort / File(s) Summary
Formatter & dprint configs
/.dprint.jsonc, .opencode/opencode.jsonc, biome.jsonc
Normalize JSONC trailing commas/brackets; bump dprint plugin versions (biome 0.12.6→0.12.8, kjanat/svg 0.2.6→0.2.7, prettier 0.67.1→0.69.0, ruff 0.7.8→0.7.9); add json-0.21.3.wasm.
Editor & build configs
.zed/settings.json, wrangler.jsonc, .gitattributes, package.json, examples/gh/package.json
Adjust Zed dprint LSP to use bunx and ["dprint","lsp"]; expand wrangler watch dirs; add CRLF rules for .bat/.cmd; move/adjust vite dependency and update Bun packageManager/engine constraints.
PowerShell completion logic & tests
src/core/completion/shells/powershell.ts, src/core/completion/completion.test.ts, docs/guide/completions.md
Change install command to pipe through Out-String; add AfterSeparator handling to state, adjust token boundary logic, add _FormatCompletionValue and _MatchesCompletionPrefix, escape single quotes for enum values, and update tests/docs to reflect behavior.
PowerShell example & tests
examples/pwsh-demo/*
Add pwsh-demo workspace: CLI (src/main.ts) exporting pwshDemo, README, Windows launcher (pwsh-demo.cmd), smoke script (smoke-powershell.ps1), Bun tests (src/main.test.ts), and package.json.
Runtime support & tests
src/runtime/support.ts, src/runtime/bun.test.ts, src/runtime/auto.test.ts, src/core/cli/cli-completion-e2e.test.ts
Lower Bun minimum from 1.3.111.3 in runtime metadata; update mocked/test Bun versions to 1.3.12 and adjust assertion messages.
Docs & changelog
README.md, docs/guide/getting-started.md, docs/guide/runtime.md, docs/reference/runtime.md, docs/reference/support-matrix.md, docs/guide/completions.md, CHANGELOG.md
Reflect Bun minimum change to >= 1.3, document `Out-String
Misc tooling & CI
.coderabbit.yaml, deno.json, docs/.vitepress/data/*
Update pre-merge checks for release/runtime sync; bump deno.json/package version to 2.1.0; normalize/resolve path handling in VitePress/typedoc helpers.

Sequence Diagram(s)

sequenceDiagram
  participant User as "User"
  participant CLI as "CLI (pwsh-demo / app)"
  participant PowerShell as "PowerShell Host"
  participant Smoke as "Smoke Test"

  Note over CLI,PowerShell: generate & install completions for current session
  User->>CLI: run `completions powershell`
  CLI-->>PowerShell: emit multiline completion script
  PowerShell->>PowerShell: Out-String (convert pipeline output to single string)
  PowerShell->>PowerShell: Invoke-Expression (evaluate completions)
  Smoke->>PowerShell: TabExpansion2 / completion query
  PowerShell-->>Smoke: completion items (formatted/escaped)
  Smoke->>Smoke: assert includes/excludes expected entries
Loading

Possibly related PRs

Suggested labels

kind: feature, area: examples, area: docs, release

Poem

Avast! Configs swabbed, plugins hoisted high 🏴‍☠️
PowerShell scripts now sail through Out-String sky,
A demo lands with tests to spar and spar,
Bun’s floor lowered, docs trimmed for par,
Merge on—we’ve fixed what was marred, arrr!

🚥 Pre-merge checks | ✅ 7 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Agents.Md Documentation Updated ⚠️ Warning PR modifies PowerShell completion architecture in src/core/completion/shells/powershell.ts but fails to update src/core/completion/AGENTS.md with documentation of new state tracking, helper functions, and refactored enum completion logic. Update src/core/completion/AGENTS.md to document PowerShell completion enhancements including AfterSeparator tracking, _FormatCompletionValue and _MatchesCompletionPrefix functions, and refactored enum completion logic.
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add PowerShell completion playground' is concise, descriptive, starts with the verb 'Add' indicating a new feature, and directly reflects the main change in the PR.
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset, detailing multiple aspects of the changes including the new PowerShell playground, completion fixes, documentation updates, and version releases.
Release Metadata Sync ✅ Passed Release metadata synchronized properly—package.json, deno.json at 2.1.0; CHANGELOG.md has matching entry with correct comparison links.
Runtime Support Sync ✅ Passed All Bun runtime support constraints consistently updated from >=1.3.11 to >=1.3 across package.json, src/runtime/support.ts, all documentation, and test files with zero stray references.
No Generated Docs Artifacts ✅ Passed No generated artifacts found in forbidden directories—docs/.vitepress/dist/ and docs/.vitepress/cache/ remain untouched, as they should be.
Changelog Update ✅ Passed CHANGELOG.md correctly documents v2.1.0 release with proper format, synchronized versions across package.json/deno.json, and substantive source code changes properly categorized.
Semver Version Bump Validation ✅ Passed PR correctly bumps version from 2.0.1 to 2.1.0 (MINOR increment) fer backward-compatible new features without breakin' changes. Source modifications and new PowerShell functionality be genuine additions, Bun support relaxation be purely compatible.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@coderabbitai coderabbitai Bot added area: runtime Node, Bun, Deno adapters and runtime detection and removed kind: bug Broken behavior or regression kind: feature New capability or product enhancement area: docs VitePress app, guides, reference pages, and docs UX area: completion Shell completion generation and parsing area: examples Runnable examples and walkthrough package labels Apr 16, 2026
Align runtime checks, docs, and package metadata around Bun `>= 1.3`
and add the Windows launcher fixes needed for the `pwsh-demo` example
to run reliably from its `.cmd` shim.
@kjanat kjanat force-pushed the powershell-completions branch from 236079f to 6f222d0 Compare April 16, 2026 19:07
Treat the active token as in-progress so partial enum values complete. Stop suggesting flags after `--` and quote enum values so accepted completions stay valid PowerShell input.

Extend the PowerShell playground and smoke tests to cover partial, inline, and quoted enum completions.
coderabbitai[bot]

This comment was marked as low quality.

@coderabbitai coderabbitai Bot added kind: feature New capability or product enhancement area: docs VitePress app, guides, reference pages, and docs UX area: completion Shell completion generation and parsing area: examples Runnable examples and walkthrough package and removed area: runtime Node, Bun, Deno adapters and runtime detection labels Apr 16, 2026
coderabbitai[bot]

This comment was marked as low quality.

@kjanat kjanat added the kind: bug Broken behavior or regression label Apr 16, 2026
Cut the 2.1.0 changelog entry and comparison links, and align npm and
Deno package metadata so the upcoming release publishes a consistent
version surface.
@coderabbitai coderabbitai Bot added the area: build Build, CI, release automation, scripts, and packaging label Apr 16, 2026
Drop the GOALS-based pre-merge checks that were producing noisy,
outdated failures and replace them with repo-specific guards for release
metadata, runtime support sync, and generated docs artifacts.
@kjanat kjanat added kind: bug Broken behavior or regression area: completion Shell completion generation and parsing labels Apr 16, 2026
Add example-package guidance for `examples/pwsh-demo` and expand the
PowerShell smoke script with proper comment-based help so repo checks
can understand the example surface.
@coderabbitai coderabbitai Bot added kind: feature New capability or product enhancement area: docs VitePress app, guides, reference pages, and docs UX area: examples Runnable examples and walkthrough package and removed kind: bug Broken behavior or regression area: build Build, CI, release automation, scripts, and packaging area: completion Shell completion generation and parsing labels Apr 16, 2026
coderabbitai[bot]

This comment was marked as resolved.

Restore meta-descriptions:check on Windows by resolving docs data paths
as real filesystem paths and normalizing TypeDoc inputs before
bootstrap.

Tighten the PowerShell smoke script to verify the native pwsh-demo
launcher matches the direct Bun completion output, and expand the
CodeRabbit runtime-support sync guard to include the getting-started
docs surface.
@coderabbitai coderabbitai Bot added area: completion Shell completion generation and parsing area: testkit In-process test harness and test utilities and removed kind: feature New capability or product enhancement area: docs VitePress app, guides, reference pages, and docs UX area: examples Runnable examples and walkthrough package labels Apr 16, 2026
coderabbitai[bot]

This comment was marked as resolved.

Assert the direct Bun and native pwsh-demo completion commands exit successfully before comparing their output so launcher failures cannot pass as empty-output mismatches.
@coderabbitai coderabbitai Bot added kind: feature New capability or product enhancement area: docs VitePress app, guides, reference pages, and docs UX release Release planning, versioning, changelog, or publish flow area: examples Runnable examples and walkthrough package and removed area: completion Shell completion generation and parsing area: testkit In-process test harness and test utilities labels Apr 17, 2026
@kjanat kjanat merged commit 70824fe into master Apr 17, 2026
11 of 12 checks passed
@kjanat kjanat deleted the powershell-completions branch April 17, 2026 11:25
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/pwsh-demo/smoke-powershell.ps1`:
- Around line 61-126: Rename the plural-noun functions to use singular nouns:
change Get-CompletionTexts to Get-CompletionText, Assert-Contains to
Assert-Contain, and Assert-Excludes to Assert-Exclude; update every call site in
this file to the new names (including the three existing usages), and ensure
parameter lists and behavior remain unchanged so only the identifiers are
refactored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: b94701bb-e971-4acc-b63e-2796f4e4d4a8

📥 Commits

Reviewing files that changed from the base of the PR and between de63bee and da4a137.

📒 Files selected for processing (1)
  • examples/pwsh-demo/smoke-powershell.ps1
📜 Review details
⏰ Context from checks skipped due to timeout of 18000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Static Checks
  • GitHub Check: Test (bun)
  • GitHub Check: Test (node)
  • GitHub Check: Test (node)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-17T11:21:42.636Z
Learning: Do not edit generated docs pages when the source of truth is an example file; maintain separation between generated docs and example source
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-17T11:21:42.636Z
Learning: Single-file examples should not bloat with walkthrough-only complexity; move complex logic to `examples/gh` workspace package
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-17T11:21:42.636Z
Learning: Examples must be pedagogical and runnable; they double as documentation content
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-17T11:21:42.636Z
Learning: `examples/gh` workspace package must be typechecked and tested in CI as a consumer canary with real-world command and test coverage
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-17T11:21:42.636Z
Learning: `examples/pwsh-demo` workspace package must maintain PowerShell completion smoke coverage and cannot have install behavior changed without updating docs
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-17T11:21:42.636Z
Learning: Do not treat `.cache/` directory as source; it contains generated build cache only
🪛 PSScriptAnalyzer (1.25.0)
examples/pwsh-demo/smoke-powershell.ps1

[warning] 61-61: The cmdlet 'Get-CompletionTexts' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Get-CompletionTexts'

(PSUseSingularNouns)


[warning] 85-85: The cmdlet 'Assert-Contains' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Assert-Contains'

(PSUseSingularNouns)


[warning] 115-115: The cmdlet 'Assert-Excludes' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Assert-Excludes'

(PSUseSingularNouns)


[warning] 44-44: Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead.

(PSAvoidUsingInvokeExpression)

🔇 Additional comments (2)
examples/pwsh-demo/smoke-powershell.ps1 (2)

20-42: Great hardening of launcher-path smoke coverage.

Line 20 through Line 42 now correctly fail on non-zero exits, reject empty output, and assert native pwsh-demo output matches direct Bun generation. This closes the earlier false-pass gap cleanly.


44-44: Install-flow execution check is correctly intentional here.

Line 44 validating Out-String | Invoke-Expression in smoke is appropriate for this example because the script is explicitly testing documented PowerShell installation behavior, not arbitrary user input execution.
Based on learnings: "examples/pwsh-demo workspace package must maintain PowerShell completion smoke coverage and cannot have install behavior changed without updating docs."

Comment on lines +61 to +126
function Get-CompletionTexts {
param([string]$InputScript)

$expanded = TabExpansion2 -inputScript $InputScript -cursorColumn $InputScript.Length
return @($expanded.CompletionMatches | ForEach-Object CompletionText)
}

<#
.SYNOPSIS
Fails when expected completion values are missing.

.DESCRIPTION
Compares the expected completion values to the actual completion results and
throws when any expected value is absent.

.PARAMETER Label
The scenario label used in the failure message.

.PARAMETER Actual
The completion texts returned by the expansion.

.PARAMETER Expected
The completion texts that must be present.
#>
function Assert-Contains {
param(
[string]$Label,
[string[]]$Actual,
[string[]]$Expected
)

$missing = @($Expected | Where-Object { $_ -notin $Actual })
if ($missing.Count -gt 0) {
throw "$Label is missing expected completions: $($missing -join ', ')"
}
}

<#
.SYNOPSIS
Fails when excluded completion values appear in the results.

.DESCRIPTION
Compares the actual completion results to a list of values that must remain
hidden and throws when any excluded value is present.

.PARAMETER Label
The scenario label used in the failure message.

.PARAMETER Actual
The completion texts returned by the expansion.

.PARAMETER Excluded
The completion texts that must not appear.
#>
function Assert-Excludes {
param(
[string]$Label,
[string[]]$Actual,
[string[]]$Excluded
)

$unexpected = @($Excluded | Where-Object { $_ -in $Actual })
if ($unexpected.Count -gt 0) {
throw "$Label included completions that should stay hidden: $($unexpected -join ', ')"
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify these function names are only used where expected before renaming.
rg -n -C2 '\b(Get-CompletionTexts|Assert-Contains|Assert-Excludes)\b'

Repository: kjanat/dreamcli

Length of output: 1578


Arrr, fix them function names to follow PowerShell conventions, ye scallywag!

Lines 61, 85, and 115 be usin' plural nouns in the function names (Get-CompletionTexts, Assert-Contains, Assert-Excludes), which violates the PSUseSingularNouns rule. The grep search confirms all calls be contained within this same file (lines 210-212), so it be a safe refactoring with no other code dependencies. Clean up them names and make yer analyzer happy!

♻️ Suggested rename patch
-function Get-CompletionTexts {
+function Get-CompletionText {
 	param([string]$InputScript)

 	$expanded = TabExpansion2 -inputScript $InputScript -cursorColumn $InputScript.Length
 	return @($expanded.CompletionMatches | ForEach-Object CompletionText)
 }

-function Assert-Contains {
+function Assert-Contain {
 	param(
 		[string]$Label,
 		[string[]]$Actual,
 		[string[]]$Expected
 	)
@@
-function Assert-Excludes {
+function Assert-Exclude {
 	param(
 		[string]$Label,
 		[string[]]$Actual,
 		[string[]]$Excluded
 	)
@@
-	$actual = Get-CompletionTexts -InputScript $case.Input
-	Assert-Contains -Label $case.Label -Actual $actual -Expected $case.Expected
-	Assert-Excludes -Label $case.Label -Actual $actual -Excluded $case.Excluded
+	$actual = Get-CompletionText -InputScript $case.Input
+	Assert-Contain -Label $case.Label -Actual $actual -Expected $case.Expected
+	Assert-Exclude -Label $case.Label -Actual $actual -Excluded $case.Excluded
🧰 Tools
🪛 PSScriptAnalyzer (1.25.0)

[warning] 61-61: The cmdlet 'Get-CompletionTexts' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Get-CompletionTexts'

(PSUseSingularNouns)


[warning] 85-85: The cmdlet 'Assert-Contains' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Assert-Contains'

(PSUseSingularNouns)


[warning] 115-115: The cmdlet 'Assert-Excludes' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Assert-Excludes'

(PSUseSingularNouns)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/pwsh-demo/smoke-powershell.ps1` around lines 61 - 126, Rename the
plural-noun functions to use singular nouns: change Get-CompletionTexts to
Get-CompletionText, Assert-Contains to Assert-Contain, and Assert-Excludes to
Assert-Exclude; update every call site in this file to the new names (including
the three existing usages), and ensure parameter lists and behavior remain
unchanged so only the identifiers are refactored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs VitePress app, guides, reference pages, and docs UX area: examples Runnable examples and walkthrough package kind: feature New capability or product enhancement release Release planning, versioning, changelog, or publish flow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

powershell completions

1 participant