BrunoLevy / geogram

a programming library with geometric algorithms
Other
1.8k stars 122 forks source link

Remove trailing whitespace and convert tabs to space #162

Closed jdumas closed 1 month ago

jdumas commented 1 month 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 1 month 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 1 month ago

Thanks!

BrunoLevy commented 1 month ago

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

jdumas commented 1 month 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).