3 ms·
The best thing to avoid a lot of style arguments is to have an automatic code formatter (on save, commit etc.) which takes care of indentations, spaces, braces
by jakub_g 14y ago
The best thing to avoid a lot of style arguments is to have an automatic code formatter (on save, commit etc.) which takes care of indentations, spaces, braces and so on.
Of course, someone needs to set up the options first, but then, life is so much easier. Sometimes you'll miss the possibility to pad similar assignments to look nicely one after the second, but other than that, autoformatting rocks.
The only really tricky thing regarding autoformatters is styling array literals. For arrays like [1, 2, 3, 4] you want it in one line, but if the elements are longer, you may want to have each of them in a separate line.
Of course, this doesn't handle camelCase vs underscored_variables, but it's a feature to leave you the freedom (or accept some solution in the team).
- gte910h 14y agoDo you know of one that works for Objective-C?