RESOLVED FIXED 81986
[check-webkit-style] Alphabetical sorting errors in headers are reported for the line after the first out of order header
https://bugs.webkit.org/show_bug.cgi?id=81986
Summary [check-webkit-style] Alphabetical sorting errors in headers are reported for ...
Martin Robinson
Reported 2012-03-22 16:10:35 PDT
When check-webkit-style reports an out-of-order header, it reports it for the line of the second header. This is a problem for the style bot, because check-webkit-style filter out errors for all lines, except ones directly modified. An example of this is https://bugs.webkit.org/show_bug.cgi?id=81602 where the style bot did not detect new style errors.
Attachments
Patch (13.86 KB, patch)
2012-03-22 16:25 PDT, Martin Robinson
no flags
Patch with a more thorough test (14.44 KB, patch)
2012-03-23 08:32 PDT, Martin Robinson
no flags
Martin Robinson
Comment 1 2012-03-22 16:25:34 PDT
David Levin
Comment 2 2012-03-22 16:31:34 PDT
Comment on attachment 133382 [details] Patch Where is the test that would have failed before but now passes?
Martin Robinson
Comment 3 2012-03-22 16:36:07 PDT
(In reply to comment #2) > (From update of attachment 133382 [details]) > Where is the test that would have failed before but now passes? There are no end-to-end tests for style checking diffs. Instead the test I've added verifies that the error is first reported for the first of both possible lines. Before this patch the line number would be one greater.
Martin Robinson
Comment 4 2012-03-22 16:38:48 PDT
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 133382 [details] [details]) > > Where is the test that would have failed before but now passes? > > There are no end-to-end tests for style checking diffs. Instead the test I've added verifies that the error is first reported for the first of both possible lines. Before this patch the line number would be one greater. Perhaps I could add a patchreader_unittest.py. I'll look into this.
Martin Robinson
Comment 5 2012-03-22 16:39:29 PDT
Comment on attachment 133382 [details] Patch Ack. It exists already. :/
Martin Robinson
Comment 6 2012-03-23 08:32:12 PDT
Created attachment 133490 [details] Patch with a more thorough test
David Levin
Comment 7 2012-03-23 08:34:05 PDT
Comment on attachment 133490 [details] Patch with a more thorough test Thanks!
Martin Robinson
Comment 8 2012-03-23 08:36:51 PDT
(In reply to comment #5) > (From update of attachment 133382 [details]) > Ack. It exists already. :/ I wasn't able to add a new unit test to patchreader_unittest.py for the cpp.py changes without pulling in the entire style checker stack. Instead I added a more thorough test to cpp_unittest.py which, I think, tests the change completely. The new test verifies that when one line of an ordering error is filtered (a single ordering error theoretically spanning two lines), the error is reported for the other one. Before my change, one of the first pair of assertions would fail, so I hope this test addresses your question more directly.
Martin Robinson
Comment 9 2012-03-23 08:37:02 PDT
Thanks for the review!
Martin Robinson
Comment 10 2012-03-23 08:43:47 PDT
Note You need to log in before you can comment on or make changes to this bug.