dsccommunity / dsccommunity/DscResource.Test

Common Tests - File Formatting: References missing cmdlets

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

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
6
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Details of the problem, bug, or enhancement

The tests Common Tests - File Formatting (FileFormatting.common*) are referencing missing cmdlets.

  • Get-UnicodeFilesList
  • ConvertTo-UTF8 (used for schema.mof files)
  • ConvertTo-ASCII (used for code script files)

They exist here: https://github.com/PowerShell/DscResource.Tests/blob/dev/MetaFixers.psm1

Verbose logs showing the problem (if applicable)

n/a

Suggested solution to the issue

Add the above cmdlets, and add a new cmdlet Set-SourceEncoding that scans for unicode files and correctly set the right encoding depending on file type.
Running just a cmdlet for the entire source folder would simplify by just running:

Get-UnicodeFilesList './source' | Set-SourceEncoding`

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 inspecting the FileFormatting.common* tests and MetaFixers.psm1, then trace where Get-UnicodeFilesList, ConvertTo-UTF8, and ConvertTo-ASCII are referenced. Confirm the expected encoding for schema.mof and code script files. Done means the missing cmdlets are available and Set-SourceEncoding can process the source folder with the proposed pipeline.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.