I asked something similar half a year ago: https://cmake.org/pipermail/cmake-developers/2015-June/025498.html
In short, there is no fully automated style checking. If someone would come up with a tool & configuration I would love to use this. So far I tested astyle and the C++ edition of ReSharper (unfortunately quite expensive). The more complicated thing would be, that you have to run the formatter over all existing code and thus you would introduce a huge amount of meaningless changes. I believe (and partially understand) many developers here on the list wouldn't really like large cosmetic changes like this. best regards, Michael > -----Original Message----- > From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] > On Behalf Of Robert Dailey > Sent: Tuesday, November 17, 2015 3:01 AM > To: CMake Developers > Subject: [cmake-developers] Code style auto-formatting > > IMHO, the code style in the CMake code base is incredibly inconsistent, but > even the consistent style that is there is a giant pain to follow by hand. > > I'm constantly fighting my tooling's auto formatting. I prefer to keep my code > additions similar to surrounding code. Do you use some tool such as clang- > format to auto format code? This will make it easier to make my style more > consistent after my work is completed. > > Thanks in advance. > -- > > 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://public.kitware.com/mailman/listinfo/cmake-developers -- 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://public.kitware.com/mailman/listinfo/cmake-developers