Bug 34001

Summary: check-webkit-style breaks on files with unknown types
Product: WebKit Reporter: Petri Latvala <petri.latvala>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Quick fix by not calling process_file if the processor is None.
none
Quick fix by not calling process_file if the processor is None. (fixed) none

Petri Latvala
Reported 2010-01-22 06:35:29 PST
Reproduction: 1. Edit WebCore/WebCoreSources.bkl 2. Run check-webkit-style The result after r53675: Traceback (most recent call last): File "WebKitTools/Scripts/check-webkit-style", line 94, in <module> main() File "WebKitTools/Scripts/check-webkit-style", line 87, in main style_checker.check_patch(patch) File "/home/adrinael/src/git/webkit/WebKitTools/Scripts/webkitpy/style/checker.py", line 915, in check_patch self.check_file(file_path, handle_style_error=error_for_patch) File "/home/adrinael/src/git/webkit/WebKitTools/Scripts/webkitpy/style/checker.py", line 883, in check_file process_file(processor, file_path, handle_style_error) File "/home/adrinael/src/git/webkit/WebKitTools/Scripts/webkitpy/style/checker.py", line 838, in _process_file processor.process(lines) AttributeError: 'NoneType' object has no attribute 'process' This is because dispatcher.dispatch_processor returns None for file_type value FileType.NONE
Attachments
Quick fix by not calling process_file if the processor is None. (1.26 KB, patch)
2010-01-22 06:39 PST, Petri Latvala
no flags
Quick fix by not calling process_file if the processor is None. (fixed) (1.27 KB, patch)
2010-01-22 06:45 PST, Petri Latvala
no flags
Petri Latvala
Comment 1 2010-01-22 06:39:46 PST
Created attachment 47199 [details] Quick fix by not calling process_file if the processor is None.
WebKit Review Bot
Comment 2 2010-01-22 06:43:19 PST
Attachment 47199 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebKitTools/ChangeLog:10: Line contains tab character. [whitespace/tab] [5] Total errors found: 1 If any of these errors are false positives, please file a bug against check-webkit-style.
Petri Latvala
Comment 3 2010-01-22 06:45:34 PST
Created attachment 47200 [details] Quick fix by not calling process_file if the processor is None. (fixed) Oops, that was embarassing. Fixed.
Adam Barth
Comment 4 2010-01-22 15:58:52 PST
Comment on attachment 47200 [details] Quick fix by not calling process_file if the processor is None. (fixed) Clearing flags on attachment: 47200 Committed r53730: <http://trac.webkit.org/changeset/53730>
Adam Barth
Comment 5 2010-01-22 15:58:57 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.