shewu / h4ck4th0n

Holy Balls: The Game
8 stars 2 forks source link

Set up clang-format to automate formatting #51

Closed shewu closed 9 years ago

shewu commented 9 years ago

clang-format should use the google c++ style guide. in particular, the biggest impact clang-format will bring is moving from a combination of spaces and tabs to 2-space 4-space indentation.

tjhance commented 9 years ago

do we have to use 2 space tabs just because google does?

shewu commented 9 years ago

4 is fine, just not 8. 8 introduces too much whitespace. i like 4 because statements in a for loop begin under the parens, among other (legacy) reasons.

tjhance commented 9 years ago

yeah I don't like 8 either. I used to use 8, wayy back in the day, but I'm mostly accustomed to 4. I can do 2 (actually, the codebase at my work uses 2) but I still prefer 4.

shewu commented 9 years ago

https://github.com/shewu/h4ck4th0n/commit/428dbf01f9e455e04818e368b37b16fdac990fe4