Bug 34001 - check-webkit-style breaks on files with unknown types
Summary: check-webkit-style breaks on files with unknown types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-22 06:35 PST by Petri Latvala
Modified: 2010-01-22 15:58 PST (History)
2 users (show)

See Also:


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 Details | Formatted Diff | Diff
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 Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petri Latvala 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
Comment 1 Petri Latvala 2010-01-22 06:39:46 PST
Created attachment 47199 [details]
Quick fix by not calling process_file if the processor is None.
Comment 2 WebKit Review Bot 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.
Comment 3 Petri Latvala 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.
Comment 4 Adam Barth 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>
Comment 5 Adam Barth 2010-01-22 15:58:57 PST
All reviewed patches have been landed.  Closing bug.