Bug 37065

Summary: check-webkit-style: decouple the StyleChecker class and error_handlers.py from patch-related code
Product: WebKit Reporter: Chris Jerdonek <cjerdonek>
Component: Tools / TestsAssignee: Chris Jerdonek <cjerdonek>
Severity: Normal CC: cjerdonek, commit-queue, hamaji
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 37067    
Bug Blocks:    
Description Flags
Proposed patch none

Description Chris Jerdonek 2010-04-03 14:28:01 PDT
checker.py and error_handlers.py shouldn't have to know how to parse and interpret patches.
Comment 1 Chris Jerdonek 2010-04-03 15:40:06 PDT
We can probably get rid of the PatchStyleErrorHandler altogether by renaming the DefaultStyleErrorHandler to StyleErrorHandler and having it accept an optional array of line numbers (the line numbers of the modified lines).

We probably also want to move the style_checker.check_patch() method to style/main.py and have the style_checker.check_file() method accept an optional array of line numbers, similar to the above.

This way only style/main.py needs to be aware of patch-related code.  This will have other benefits for future patches as well.
Comment 2 Chris Jerdonek 2010-04-11 13:07:57 PDT
Created attachment 53098 [details]
Proposed patch
Comment 3 Chris Jerdonek 2010-04-11 13:10:09 PDT
This report was originally to move the patch-related code to a separate file, but for now it would be sufficient and better simply to move that code into a separate class.
Comment 4 Shinichiro Hamaji 2010-04-11 20:40:46 PDT
Comment on attachment 53098 [details]
Proposed patch

Looks sane.
Comment 5 WebKit Commit Bot 2010-04-11 20:53:06 PDT
Comment on attachment 53098 [details]
Proposed patch

Clearing flags on attachment: 53098

Committed r57467: <http://trac.webkit.org/changeset/57467>
Comment 6 WebKit Commit Bot 2010-04-11 20:53:11 PDT
All reviewed patches have been landed.  Closing bug.