Bug 69481 - The GTK+ WebKit2 headers produce a lot of style warnings
Summary: The GTK+ WebKit2 headers produce a lot of style warnings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords:
: 65179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-05 17:03 PDT by Martin Robinson
Modified: 2011-10-06 15:43 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.50 KB, patch)
2011-10-05 17:17 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (8.49 KB, patch)
2011-10-06 14:58 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2011-10-05 17:03:07 PDT
We should be smarter about what warnings we emit for what files.
Comment 1 Martin Robinson 2011-10-05 17:17:57 PDT
Created attachment 109886 [details]
Patch
Comment 2 Carlos Garcia Campos 2011-10-06 00:00:12 PDT
*** Bug 65179 has been marked as a duplicate of this bug. ***
Comment 3 Martin Robinson 2011-10-06 11:46:14 PDT
Comment on attachment 109886 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109886&action=review

> Tools/Scripts/webkitpy/style/checker_unittest.py:317
> +        # Check unskipped files

This comment is missing a period. Assuming this pach is r+'d I will fix it before landing.
Comment 4 Daniel Bates 2011-10-06 12:11:38 PDT
Comment on attachment 109886 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109886&action=review

> Tools/Scripts/webkitpy/style/checker.py:468
> +    def _should_skip_file_path(self, file_path, skip_array_entry):

Nit: The body of this function looks like it was indented too much. The indentation for the first if-statement should be four space characters.

> Tools/Scripts/webkitpy/style/checker.py:469
> +            if isinstance(skip_array_entry, re._pattern_type):

Is there some other way we can accomplish instead of type checking or using non-public API (*)?

(*) From my understanding of Python conventions, anything that begins with an underscore ('_') isn't part of the public API and hence its existence isn't guaranteed in future versions.

>> Tools/Scripts/webkitpy/style/checker_unittest.py:317
>> +        # Check unskipped files
> 
> This comment is missing a period. Assuming this pach is r+'d I will fix it before landing.

Nit: I think "non-skipped" better describes this than "unskipped". "Unskipped files" implies to me that we chose to skip these files at some point in time, but now we're reverting that decision. The phrase "non-skipped files" implies that these are files we always warned about (i.e. these were the files that we didn't skip).
Comment 5 David Levin 2011-10-06 14:21:52 PDT
Comment on attachment 109886 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109886&action=review

Just one comment beyond what Daniel said (whose comments I agree with).  Thanks Daniel!

> Tools/Scripts/webkitpy/style/checker.py:285
> +    re.compile('Source/WebKit2/UIProcess/API/gtk/WebKit(?!.*Private.h).*.h$'),

Should be:
  re.compile(r'Source/WebKit2/UIProcess/API/gtk/WebKit(?!.*Private\.h).*\.h$'),
Comment 6 Martin Robinson 2011-10-06 14:58:32 PDT
Created attachment 110036 [details]
Patch
Comment 7 Martin Robinson 2011-10-06 15:04:14 PDT
Comment on attachment 110036 [details]
Patch

Thank you both for the prompt and thorough reviews.
Comment 8 WebKit Review Bot 2011-10-06 15:43:51 PDT
Comment on attachment 110036 [details]
Patch

Clearing flags on attachment: 110036

Committed r96866: <http://trac.webkit.org/changeset/96866>
Comment 9 WebKit Review Bot 2011-10-06 15:43:56 PDT
All reviewed patches have been landed.  Closing bug.