Bug 101230 - Style-checker strips comments before checking indentation
Summary: Style-checker strips comments before checking indentation
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
Depends on:
Reported: 2012-11-05 09:36 PST by Allan Sandfeld Jensen
Modified: 2017-07-18 08:29 PDT (History)
4 users (show)

See Also:

Patch (1.89 KB, patch)
2012-11-05 09:38 PST, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Patch (2.87 KB, patch)
2012-11-06 02:35 PST, Allan Sandfeld Jensen
tony: review+
allan.jensen: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld Jensen 2012-11-05 09:36:26 PST
The style-checker performs its indentation check on cleansed lines, this means that comments are not checked for indentation, and inline comments followed by white-space will be miscounted by style-checker. 

Instead the style-checker should perform indentation check on raw-lines. This way it will also ensure comments correctly indented.
Comment 1 Allan Sandfeld Jensen 2012-11-05 09:38:46 PST
Created attachment 172353 [details]
Comment 2 Adam Barth 2012-11-05 10:07:29 PST
Comment on attachment 172353 [details]

Please add a test.  There's a nice unit testing framework for this code.
Comment 3 Allan Sandfeld Jensen 2012-11-06 02:35:25 PST
Created attachment 172531 [details]
Comment 4 Allan Sandfeld Jensen 2012-11-09 06:38:06 PST
Comment on attachment 172531 [details]

I want to run a one more test on this patch before landing. I am uncertain if multi-line comments are correctly handled, or might give false errors.