Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py

Issue 2749513008: Remove header ordering checks from check-webkit-style (Closed)
Patch Set: revertCH Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py
index e020141ef4380979b76e28834c4ea5c6e51eba30..96f260622598079c5ad403ac3b5c69dddb741f11 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -2572,36 +2572,6 @@ def check_include_line(filename, file_extension, clean_lines, line_number, inclu
primary_header_exists = _does_primary_header_exist(filename)
dcheng 2017/03/17 05:37:29 I think this can be removed (and possibly header_t
alancutter (OOO until 2018) 2017/03/19 23:12:48 Yep, removed.
include_state.header_types[line_number] = header_type
- # Only proceed if this isn't a duplicate header.
- if duplicate_header:
- return
-
- # We want to ensure that headers appear in the right order:
- # 1) for implementation files: primary header, blank line, alphabetically sorted
- # 2) for header files: alphabetically sorted
- # The include_state object keeps track of the last type seen
- # and complains if the header types are out of order or missing.
- error_message = include_state.check_next_include_order(header_type,
- file_extension == 'h',
- primary_header_exists)
-
- # Check to make sure we have a blank line after primary header.
- if not error_message and header_type == _PRIMARY_HEADER:
- next_line = clean_lines.raw_lines[line_number + 1]
- if not is_blank_line(next_line):
- error(line_number, 'build/include_order', 4,
- 'You should add a blank line after implementation file\'s own header.')
-
- if error_message:
- if file_extension == 'h':
- error(line_number, 'build/include_order', 4,
- '%s Should be: alphabetically sorted.' %
- error_message)
- else:
- error(line_number, 'build/include_order', 4,
- '%s Should be: primary header, blank line, and then alphabetically sorted.' %
- error_message)
-
def check_language(filename, clean_lines, line_number, file_extension, include_state,
file_state, error):

Powered by Google App Engine
This is Rietveld 408576698