Skip to content

Fix PSUseBOMForUnicodeEncodedFile #4339

@joshcorr

Description

@joshcorr

Summary of new feature

Since removing all BOM in from files in #4206 the PSScriptAnalyzer rule has been failing on a few files that still have extended characters in them. These characters should be removed or a PSScriptAnalyzer override should be put in place.

See UseBOMForUnicodeEncodedFile.md for more details

Proposed technical details (if applicable)

Use (Get-Content .\functions\Add-DbaComputerCertificate.ps1) -match "[\x90-\xFF]" to find the affected lines in each file and replace it with appropriate text. In the file above the offending code is ¯\_(ツ)_/¯ and it would be replaced or deleted. ¯\_(ツ)_/¯

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions