Cinder icon indicating copy to clipboard operation
Cinder copied to clipboard

Refactor/ trim whitespaces

Open dimateos opened this issue 11 months ago • 0 comments

Addresses https://github.com/cinder/Cinder/issues/2341

I created the following script to ONLY trim trailing white spaces:

  • src: https://github.com/dimateos/Open-Cinder/blob/refactor/trim-whitespaces/tools/ci/trim_whitespaces.sh
  • usage: displayed with --help
  • config: has default target FOLDERS and EXTENSIONS, but can be set by args too
    • DEFAULT_FOLDERS=("src/cinder" "include/cinder" "test" "samples")
    • DEFAULT_EXTENSIONS=("*.cpp" "*.h" "*.mm" "*.java" "*.txt" "*.rc" "*.glsl" "*.frag" "*.vert" "*.comp")
  • preview: you can use --preview to see what would be targeted beforehand
  • example: ./trim_whitespaces.sh --path ../../ --folders test

Then I applied the trimming in separate commits per parent folders:

  • Feel free to squash the commits
  • Or use a CI bot so the line changes are not assigned to me whatever

I think this is very worth considering!

at least this PR can be used as a diff for what would be trimming the whole sources...

dimateos avatar Feb 04 '25 22:02 dimateos