Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common Tests - File Formatting: References missing cmdlets #92

Open
johlju opened this issue Jan 4, 2021 · 0 comments
Open

Common Tests - File Formatting: References missing cmdlets #92

johlju opened this issue Jan 4, 2021 · 0 comments
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@johlju
Copy link
Member

johlju commented Jan 4, 2021

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`
@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

1 participant