diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
| commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
| tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Tools/Scripts/webkitpy/style/checkers/cpp.py | |
| parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
| download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz | |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Tools/Scripts/webkitpy/style/checkers/cpp.py')
| -rw-r--r-- | Tools/Scripts/webkitpy/style/checkers/cpp.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py index f29361766..1eea4973f 100644 --- a/Tools/Scripts/webkitpy/style/checkers/cpp.py +++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py @@ -2433,8 +2433,8 @@ def check_for_null(clean_lines, line_number, file_state, error): if search(r'\bgdk_pixbuf_save_to\w+\b', line): return - # Don't warn about NULL usage in gtk_widget_style_get(). See Bug 51758. - if search(r'\bgtk_widget_style_get\(\w+\b', line): + # Don't warn about NULL usage in gtk_widget_style_get() or gtk_style_context_get_style. See Bug 51758 + if search(r'\bgtk_widget_style_get\(\w+\b', line) or search(r'\bgtk_style_context_get_style\(\w+\b', line): return # Don't warn about NULL usage in soup_server_new(). See Bug 77890. @@ -2776,8 +2776,11 @@ def check_include_line(filename, file_extension, clean_lines, line_number, inclu if previous_match: previous_header_type = include_state.header_types[previous_line_number] if previous_header_type == _OTHER_HEADER and previous_line.strip() > line.strip(): - error(line_number, 'build/include_order', 4, - 'Alphabetical sorting problem.') + # This type of error is potentially a problem with this line or the previous one, + # so if the error is filtered for one line, report it for the next. This is so that + # we properly handle patches, for which only modified lines produce errors. + if not error(line_number - 1, 'build/include_order', 4, 'Alphabetical sorting problem.'): + error(line_number, 'build/include_order', 4, 'Alphabetical sorting problem.') if error_message: if file_extension == 'h': @@ -3106,6 +3109,7 @@ def check_identifier_name_in_declaration(filename, line_number, line, file_state and not (filename.find('gtk') >= 0 and modified_identifier.startswith('webkit_') >= 0) and not modified_identifier.startswith('tst_') and not modified_identifier.startswith('webkit_dom_object_') + and not modified_identifier.startswith('webkit_soup') and not modified_identifier.startswith('NPN_') and not modified_identifier.startswith('NPP_') and not modified_identifier.startswith('NP_') |
