Skip to content

feat: enhance function listing with category and description filters#1615

Open
Gijsreyn wants to merge 2 commits into
PowerShell:mainfrom
Gijsreyn:gh-1581/main/function-improvement-list
Open

feat: enhance function listing with category and description filters#1615
Gijsreyn wants to merge 2 commits into
PowerShell:mainfrom
Gijsreyn:gh-1581/main/function-improvement-list

Conversation

@Gijsreyn

@Gijsreyn Gijsreyn commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

Adds --category and --description filtering options to the dsc function list command:

  • -c/--category — filter by function category; can be specified multiple times to require all categories (AND filter).
  • -d/--description — case-insensitive search within the function description, supports wildcards (*, ?).

PR Context

Fixes #1581

Copilot AI review requested due to automatic review settings July 10, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the dsc function list CLI to support filtering functions by metadata (category and description), addressing the UX request in #1581 by avoiding the need to post-filter results in a shell pipeline.

Changes:

  • Add --category/-c support (repeatable; treated as an AND filter) for dsc function list.
  • Add --description/-d support for case-insensitive wildcard matching against function descriptions.
  • Add localization strings and Pester coverage for category/description filtering and combined filters.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/dsc-lib/src/functions/mod.rs Adds FunctionCategory::ALL and FromStr parsing to enable CLI category argument parsing with a localized invalid-category error.
lib/dsc-lib/locales/en-us.toml Adds the localized functions.invalidCategory message used by FunctionCategory::FromStr.
dsc/src/args.rs Extends the function list subcommand args with --category and --description.
dsc/src/subcommand.rs Implements category AND-filtering and description wildcard filtering in list_functions.
dsc/locales/en-us.toml Adds localized help text for the new args and a new invalid-description-filter error string.
dsc/tests/dsc_function_list.tests.ps1 Adds Pester tests for category filtering, description filtering, and combined filters.

Comment thread dsc/src/subcommand.rs
@Gijsreyn

Copy link
Copy Markdown
Collaborator Author

@SteveL-MSFT, has something recently changed on the workflows that it instantly errors out?

@SteveL-MSFT

Copy link
Copy Markdown
Member

@SteveL-MSFT, has something recently changed on the workflows that it instantly errors out?

Let me look into this, code coverage reporting was added

@SteveL-MSFT

SteveL-MSFT commented Jul 10, 2026

Copy link
Copy Markdown
Member

Ok, I think this should fix CI #1619

Basically, the PR broke the build, but the workflow is not reporting that correctly. Look at the build checks and expand the build item to see the actual error that needs to be fixed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI UX improvement: dsc function list

3 participants