Maato / volumeicon

Volume Icon aims to be a lightweight volume control that sits in your systray.
http://nullwise.com/volumeicon.html
GNU General Public License v3.0
183 stars 45 forks source link

Use clang-format to normalize the coding style #34

Closed nkoep closed 10 years ago

nkoep commented 10 years ago

Browsing through the volumeicon code here on github makes it fairly obvious that there is no consistent coding style used throughout the codebase. (I'm certainly guilty of adding to this problem myself.) I therefore propose to use an automatic formatting tool like clang-format to keep things a tad more coherent from now on. Obviously, coding style is always a controversial issue, but I think most people would agree that consistency is desirable even if they disagree on specifics like brace style, indentation, etc.

These commits add a sample configuration file for clang-format, as well as a script to format all files under src/ in place. Consider this PR a suggestion rather than something I want to land as is.

Maato commented 10 years ago

I took a look at your proposed changes and I have to say that I'm not really opposed to it. There are however some changes regarding the coding style I would prefer to see, namely:

UseTab: ForIndentation SpaceAfterControlStatementKeyword: false

There are some files though were I am not sure if the styling should be applied, in particular the files from other projects such as the alsa-volume-mapping and bind files.