Title: [150457] trunk/Tools
Revision
150457
Author
[email protected]
Date
2013-05-21 11:15:39 -0700 (Tue, 21 May 2013)

Log Message

Revert r149635, it was too optimistic.

Rubber-stamped by Andreas Kling.

We are not at the point where we can always use more descriptive macros instead of PLATFORM()

* Scripts/webkitpy/style/checkers/cpp.py:
(check_invalid_increment):
(process_line):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_plain_integral_bitfields):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (150456 => 150457)


--- trunk/Tools/ChangeLog	2013-05-21 18:04:54 UTC (rev 150456)
+++ trunk/Tools/ChangeLog	2013-05-21 18:15:39 UTC (rev 150457)
@@ -1,3 +1,19 @@
+2013-05-21  Jessie Berlin  <[email protected]>
+
+        Revert r149635, it was too optimistic.
+
+        Rubber-stamped by Andreas Kling.
+
+        We are not at the point where we can always use more descriptive macros instead of PLATFORM()
+        #ifdefs in WebCore code outside of WebCore/platform.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_invalid_increment):
+        (process_line):
+        (CppChecker):
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (CppStyleTest.test_plain_integral_bitfields):
+
 2013-05-21  Jer Noble  <[email protected]>
 
         Unreviewed; fix lldb synthetic representation of WTF::Vector after r148891.

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (150456 => 150457)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2013-05-21 18:04:54 UTC (rev 150456)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2013-05-21 18:15:39 UTC (rev 150457)
@@ -1116,19 +1116,6 @@
               'Changing pointer instead of value (or unused value of operator*).')
 
 
-def check_for_webcore_platform_layering_violation(filename, clean_lines, line_number, error):
-    """Checks for platform-specific code inside WebCore outside of the platform layer."""
-    directory = FileInfo(filename).split()[0]
-    if not match(r'Source/WebCore', directory):
-        return
-    if match(r'Source/WebCore/platform', directory):
-        return
-    line = clean_lines.elided[line_number]
-    if match(r'\s*#\s*if\s*PLATFORM\s*\(', line):
-        error(line_number, 'build/webcore_platform_layering_violation', 5,
-              'Do not add platform specific code in WebCore outside of platform.')
-
-
 class _ClassInfo(object):
     """Stores information about a class."""
 
@@ -3577,7 +3564,6 @@
     check_for_non_standard_constructs(clean_lines, line, class_state, error)
     check_posix_threading(clean_lines, line, error)
     check_invalid_increment(clean_lines, line, error)
-    check_for_webcore_platform_layering_violation(filename, clean_lines, line, error)
 
 
 def _process_lines(filename, file_extension, lines, error, min_confidence):
@@ -3644,7 +3630,6 @@
         'build/printf_format',
         'build/storage_class',
         'build/using_std',
-        'build/webcore_platform_layering_violation',
         'legal/copyright',
         'readability/braces',
         'readability/casting',

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (150456 => 150457)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2013-05-21 18:04:54 UTC (rev 150456)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2013-05-21 18:15:39 UTC (rev 150457)
@@ -2448,26 +2448,6 @@
         self.assert_lint('long int a : 30;', errmsg)
         self.assert_lint('int a = 1 ? 0 : 30;', '')
 
-    def test_webcore_platform_layering_violation(self):
-        errmsg = ('Do not add platform specific code in WebCore outside of platform.  [build/webcore_platform_layering_violation] [5]')
-
-        error_collector = ErrorCollector(self.assertTrue)
-        self.process_file_data('Source/WebCore/loader/NavigationAction.cpp', 'cpp', ['#if PLATFORM(MAC)', '#endif'], error_collector)
-        self.assertEqual(1, error_collector.result_list().count(errmsg))
-
-        error_collector = ErrorCollector(self.assertTrue)
-        self.process_file_data('Source/WebCore/platform/PlatformEvent.cpp', 'cpp', ['#if PLATFORM(MAC)', '#endif'], error_collector)
-        self.assertEqual(0, error_collector.result_list().count(errmsg))
-
-        error_collector = ErrorCollector(self.assertTrue)
-        self.process_file_data('Source/WebCore/loader/NavigationAction.cpp', 'cpp', ['#if PLATFORM ( MAC )', '#endif'], error_collector)
-        self.assertEqual(1, error_collector.result_list().count(errmsg))
-
-        error_collector = ErrorCollector(self.assertTrue)
-        self.process_file_data('Source/WebCore/loader/NavigationAction.cpp', 'cpp', ['// #if PLATFORM(MAC)', '#endif'], error_collector)
-        self.assertEqual(0, error_collector.result_list().count(errmsg))
-
-
 class CleansedLinesTest(unittest.TestCase):
     def test_init(self):
         lines = ['Line 1',
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to