Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Cleanup line endings #242

Closed
numberZero opened this issue Sep 23, 2023 · 0 comments · Fixed by #245
Closed

Cleanup line endings #242

numberZero opened this issue Sep 23, 2023 · 0 comments · Fixed by #245

Comments

@numberZero
Copy link
Contributor

numberZero commented Sep 23, 2023

Can be done easily with this bash snippet:

find -type f |  # list all regular files
grep -E '\.(h|cpp|fsh|vsh|mm)$' |  # filter for text files
xargs -n 1 sed -i 's:\s*$::'  # for each file, trim trailing whitespace including the CR

(and the same for LICENSE)
Should result in diff stats like:

$ git diff --stat | tail
 source/Irrlicht/CZipReader.h                       |  444 +-
 source/Irrlicht/IAttribute.h                       |  126 +-
 source/Irrlicht/Irrlicht.cpp                       |  318 +-
 source/Irrlicht/KHR/khrplatform.h                  |  580 +-
 source/Irrlicht/S2DVertex.h                        |   52 +-
 source/Irrlicht/SB3DStructs.h                      |  134 +-
 source/Irrlicht/SoftwareDriver2_helper.h           |  602 +-
 source/Irrlicht/os.cpp                             |  742 +-
 source/Irrlicht/os.h                               |  186 +-
 302 files changed, 99197 insertions(+), 99197 deletions(-)
$ git diff --stat --ignore-space-at-eol | tail
$

which aren’t good for a PR but necessary

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant