Re: [webkit-dev] Switch statement indentation

2009-12-03 Thread Geoffrey Garen
Sounds good to me. Geoff On Dec 2, 2009, at 8:58 PM, Peter Kasting wrote: On Wed, Dec 2, 2009 at 8:05 PM, Maciej Stachowiak m...@apple.com wrote: I believe one rule that could work is something like this: - Indent case labels inside a switch two spaces. - Indent actual statements inside a

[webkit-dev] Switch statement indentation

2009-12-02 Thread Chris Marrin
The style script flagged an issue in my code yesterday for an issue I didn't even know existed. How do you indent case clauses for a switch statement? The WebKit style states that case clauses have the same indentation as their switch. I HATE that style. And I had no idea that was the

Re: [webkit-dev] Switch statement indentation

2009-12-02 Thread Chris Marrin
On Dec 2, 2009, at 4:47 PM, Alexey Proskuryakov wrote: On 02.12.2009, at 15:25, Chris Marrin wrote: Maybe we could change the style rule in the interest of changing fewer files (and because I think it generally reads better)? I support changing or dropping this rule. Because of this

Re: [webkit-dev] Switch statement indentation

2009-12-02 Thread Geoffrey Garen
The downside is that some code can get indented too far, which is particularly unfortunate for large switches. We could issue a fuzzy declaration such as, Indent case blocks, except in situations where an unreasonable amount of code would end up so-indented, causing readability problems.

Re: [webkit-dev] Switch statement indentation

2009-12-02 Thread Peter Kasting
On Wed, Dec 2, 2009 at 8:05 PM, Maciej Stachowiak m...@apple.com wrote: I believe one rule that could work is something like this: - Indent case labels inside a switch two spaces. - Indent actual statements inside a switch four spaces. - In the case where a case label is followed by a block,