[webkit-dev] Switch statement indentation

Chris Marrin cmarrin at apple.com
Wed Dec 2 15:25:55 PST 2009

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 WebKit style. I use the "indent the case" style and have never  
had anyone flag it in the past. Without getting into style religion, I  
was looking at the code and it seems that there are many more uses of  
the "indent the case" style than the "correct" style.

Maybe we could change the style rule in the interest of changing fewer  
files (and because I think it generally reads better)?

I'm fine with changing my code to match the style. But the style  
script is going to be kicking out a lot of these errors and I think we  
should make sure we want to go down this road before that happens.

cmarrin at apple.com

More information about the webkit-dev mailing list