BrunoLevy / geogram

a programming library with geometric algorithms
Other
1.87k stars 126 forks source link

Remove trailing whitespace and convert tabs to space #162

Closed jdumas closed 4 months ago

jdumas commented 4 months ago

A lot of files have a mix of tabs and space, so converting tabs to 8-spaces in bulk. Similarly I trimmed any trailing whitespace.

You can ignore whitespace to make sure I've only edited whitespaces in this PR.

Ideally we'd have clang-format enabled in github action to make sure files are consistently formatted, but I guess that's a topic for another time :)

BrunoLevy commented 4 months ago

Hi Jeremie, Finally I have written a script that converts tabs and trims trailing whitespace, and applied it to whole sourcetree (and I have updated my editor config so that it removes all trailing whitespaces each time it saves a file). I have just pushed a new version.

jdumas commented 4 months ago

Thanks!

BrunoLevy commented 4 months ago

Now working on a script that will in addition reindent all sources. It is on its way...

jdumas commented 4 months ago

Or adopt clang-format and stop worrying about these details :) (this repo has a script to find the clang-format settings that best match your existing style, maybe this could be adapted to find the config you like the best).