Summary: | Add checks for switch statement indentation to cpplint | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jakob Petsovits <jpetsovits> | ||||||||
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | levin | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Jakob Petsovits
2009-07-21 11:54:22 PDT
Created attachment 33197 [details]
Add checks for switch statement indentation to cpplint
Note to self: Don't post patch files unless bug report is created and URL is inserted into the ChangeLog.
Apart from that, same patch as the previous one.
Re changelog: Just use prepare-ChangeLog --bug YourBugNumber Comment on attachment 33197 [details]
Add checks for switch statement indentation to cpplint
In general it looks good but I think it will have problems on nested switch statements. What can be done about that?
Created attachment 33200 [details]
Add checks for switch statement indentation to cpplint (try 3)
Good point, I had not thought of that case. Here's a relatively simple solution that'll work in pretty much all common cases, approach explained in the code comments. Plus more test cases. Is that good enough, or does it need to be perfect?
Comment on attachment 33200 [details]
Add checks for switch statement indentation to cpplint (try 3)
This is an improvement over what we have now and seems to minimize the possibility of false alarms (with respect to nested switch statements), so it seems like a positive step forward.
Committed as http://trac.webkit.org/changeset/46189 |