Skip to content

Enforce UTF-8 and LF for changed text files - #10722

Open
anandt1201 wants to merge 1 commit into
dotnet:mainfrom
anandt1201:fix/9957-text-encoding-policy
Open

anandt1201 wants to merge 1 commit into
dotnet:mainfrom
anandt1201:fix/9957-text-encoding-policy

Conversation

@anandt1201

Copy link
Copy Markdown

Text files currently have no enforced UTF-8-without-BOM or LF policy.
Set editor and Git defaults, and validate committed text changed by
pull requests and pushes in the lint workflow. Read Git blobs rather
than checkout bytes so Windows line-ending settings cannot change the
result. Leave unrelated historical files untouched.

Regression fixtures cover valid Unicode, BOM, CRLF, invalid UTF-8,
UTF-16, filenames with spaces, binary exemptions, historical violations,
and checkout-only changes. Both tests pass; the checker also passes on
this branch's six changed files. Black, isort, Flake8, Ruff, and Pylint
pass. CONTRIBUTING.md passes Markdown lint and both links pass.
Checkov passes all 19 checks for the changed workflow. The full-repository
scan retains its existing finding in copilot-setup-steps.yml, and
Prettier retains existing formatting warnings.

Prepared with AI assistance; implementation and regression coverage
reviewed locally.

Fixes #9957

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All release notes should be consistent for BOM and LEs

1 participant