Enforce whitespace consistency in maintained files - #1489
Enforce whitespace consistency in maintained files#1489alex-thiessen-for-siemens wants to merge 3 commits into
Conversation
b6431a5 to
4b6cf63
Compare
|
This is awesome! Thank you! May I ask, which files end in CRLF? the only two that I can find are yaml-cpp.natvis and yaml-cpp.natvis.md This should definitely be also fixed and changed to LF. I would say the policy is:
|
SGSSGene
left a comment
There was a problem hiding this comment.
This is great!
I would like to pin it down to only LF symbols.
And even though it is called a 'newline' character, I think it is easier/better to think of it as a 'end of line' character, which makes it very clear when/how to use it and why there has to be one at the end of a non-empty file.
|
@jbeder I think this is a great change to keep maintain cleanliness of all files which reduces noise in PRs for whitespaces. This needs your approval and intervention to add there CI workflow as an requirement for PRs to pass. |
Document trailing-whitespace and final-newline requirements. Require LF line endings and configure editor defaults. Keep the vendored GoogleTest sources excluded from the policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reject carriage returns so maintained files use LF line endings. Retain trailing-whitespace, final-newline, binary, and vendored-tree handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Normalize the maintained-file baseline, including remaining CRLF files. Ensure all maintained text uses LF line endings. Leave the vendored GoogleTest tree unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4b6cf63 to
72ced0f
Compare
|
Addressed. |
|
Initially, I decided that natvis-related files should remain CRLF, as these are for Windows users only. Hope Visual Studio can deal with LF natvis, else an exception to the EOL check would be needed. |
Summary
This standalone cleanup is motivated by the incidental whitespace changes mixed into #1488. It normalizes the existing maintained-file baseline and adds a permanent check so future semantic PRs do not need to carry unrelated whitespace edits.
Policy
test/googletest-1.16.0/tree is excluded.The cleanup normalizes maintained text to LF and leaves the vendored tree unchanged. You may run
python3 util/check-whitespace.pyto check whitespace before submitting a pull request.CI
The new
Whitespaceworkflow runs on pushes, pull requests, and manual dispatch. Please add theWhitespacecheck to the required status checks formasterafter this workflow is available. This account does not have permission to change the upstream branch rules.This PR intentionally does not modify or comment on #1488.