Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Clarify name prefix requirements for classes and enums

Open
#151 0 comments 0 reactions 1 assignee View on GitHub

@michaeltlombardi is already working on this.

Since Apr 5, 2023.

Assessment

This issue has not been assessed yet.

Description

area-conceptual area-resource-docs dsc-v2 issue-doc-bug
Prerequisites
  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • Verify Version: If there is a mismatch between documentation and the module on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
Version

v2.0

Links
Summary

If a class or enum is defined with the same name in more than one module, compiling configurations that use both of those modules fails due to the name collision.

Details

We already partially cover this problem for defining the Reasons property for machine configuration:

https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/blob/9a81631df4048e98ed5788d6a10eeb9516d864ea/dsc/docs-conceptual/dsc-2.0/concepts/class-based-resources.md?plain=1#L559-L566

We should generalize this note and advice and surface it wherever it makes sense.

Suggested Fix

We should document this behavior, suggest that authors prefix their enums and classes with their module name, and add name prefixing to the best practices section for the Class-based DSC Resources article.

We may want to add an include that we can use throughout the documentation wherever we're talking about naming classes and enums for use as DSC Resource property types.

Dominant language
PowerShell
Stars
60
Forks
48
Avg merge
8h 35m
Merged PRs (30d)
5

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.

More from MicrosoftDocs/PowerShell-Docs-DSC

All issues in MicrosoftDocs/PowerShell-Docs-DSC

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.