On Fri, 2014-01-31 at 14:24 +0100, Eric Noulard wrote: > > We didn't try to integrate it with the build system. We just checked in > > the configuration file and a script people could use if they wanted to > > re-beautify their code. > > Would you mind sharing the script you used with us?
Sure, it's pretty simple. Works on Linux and Mac. Windows users have to fend for themselves :-). In addition to standard uncrustify, this converts all TABs to the appropriate number of spaces (uncrustify doesn't mess with stuff inside comments for example) and it removes all trialing whitespace. This doesn't make any backup files; it's assumed you're using a source control system and you've committed a copy beforehand (because it was written for a one-time reformat originally) but if you want to keep the .orig file for safety, just don't delete it.
reformat.sh
Description: application/shellscript
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake