Bug 37065 - check-webkit-style: decouple the StyleChecker class and error_handlers.py from patch-related code
Summary: check-webkit-style: decouple the StyleChecker class and error_handlers.py fro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Chris Jerdonek
URL:
Keywords:
Depends on: 37067
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-03 14:28 PDT by Chris Jerdonek
Modified: 2010-04-11 20:53 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (8.58 KB, patch)
2010-04-11 13:07 PDT, Chris Jerdonek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.