parkouss / funq

funq is a python framework to write FUNctional tests for Qt applications
Other
63 stars 18 forks source link

Format all *.cpp and *.h files with clang-format #54

Closed ubruhin closed 5 years ago

ubruhin commented 5 years ago

There were many trailing spaces in the .cpp and .h files, which are automatically removed by many editors. Until now I always discarded these changes to avoid cluttering up my commits with unrelated changes, but that's a bit cumbersome ;)

As the coding style isn't very consistent over all files anyway, I got the idea to format all files with clang-format to fix all style inconsistencies and trailing spaces. I added a small bash script to run clang-format with the proper options on all .cpp and .h files.

I don't know if you agree with these changes - feel free to close this pull request if you don't like it :) Or if you want a slightly different coding style, don't hesitate to ask, I'll then adjust the .clang-format accordingly.

Btw, I manually set the configuration in .clang-format to get a style which matches (more or less) the currently used style to keep the diff small. An alternative would be to use e.g. Google's coding style to get a commonly used coding style, but then the diff will be much bigger.