Remove UTF-8 BOM from text files
PR Summary
- Remove UTF-8 BOM from text files.
- Specify utf-8 charset in .editorconfig to prevent IDEs inserting BOM.
PR Checklist
- [x] PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- [x] Summarized changes
- [x] Change is not breaking
- [x] Make sure all
.cs,.ps1and.psm1files have the correct copyright header - [x] Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
- [x] This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:to the beginning of the title and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix
Remove UTF-8 BOM from text files.
My main concern is with this part; Windows PowerShell isn't going to like BOM-less UTF-8
Instead, ps*1 files should probably have a BOM and other text files should not
The configuration should match that, but generally looks good to me
@xtqqczze after looking through your approach in this PR and thinking about some of the particulars of this repo, I've opened https://github.com/PowerShell/PSScriptAnalyzer/pull/1665, which goes a bit further and tries to clean up some of the strangeness in the PSSA repo.
In particular, it specifies more settings, uses UTF-8 with BOM for PowerShell files, and makes sure test assets (some of which are deliberately encoded or formatted differently) are put in a protected assets directory
@rjmholt I will close once #1665 is merged.