Changeset 53383 in webkit
- Timestamp:
- Jan 17, 2010 6:39:12 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r53382 r53383 1 2010-01-17 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 style-check script reports loads of errors on gtk2drawing.c 6 https://bugs.webkit.org/show_bug.cgi?id=33771 7 8 Exempt WebCore/platform/gtk/gtk2drawing.c and 9 WebCore/platform/gtk/gtk2drawing.h from style checks. 10 11 * Scripts/webkitpy/style/cpp_style.py: 12 * Scripts/webkitpy/style/cpp_style_unittest.py: 13 1 14 2010-01-17 Chris Jerdonek <cjerdonek@webkit.org> 2 15 -
trunk/WebKitTools/Scripts/webkitpy/style/cpp_style.py
r53382 r53383 2898 2898 if (filename != '-' and not can_handle(filename)): 2899 2899 sys.stderr.write('Ignoring %s; not a .cpp, .c or .h file\n' % filename) 2900 elif is_exempt(filename): 2901 sys.stderr.write('Ignoring %s; This file is exempt from the style guide.\n' % filename) 2900 2902 else: 2901 2903 process_file_data(filename, file_extension, lines, error, verbosity) … … 2915 2917 """ 2916 2918 return os.path.splitext(filename)[1] in ('.h', '.cpp', '.c') 2919 2920 2921 def is_exempt(filename): 2922 """Checks if the given file is exempt from the style guide. For example, 2923 some files are purposefully mantained in Mozilla style to ease future 2924 merges. 2925 2926 Args: 2927 filename: A filename. It may contain directory names. 2928 """ 2929 return os.path.basename(filename) in ( 2930 'gtk2drawing.c', 2931 'gtk2drawing.h', 2932 ) -
trunk/WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py
r53382 r53383 3600 3600 self.assert_(not cpp_style.can_handle('-')) 3601 3601 3602 def test_is_exempt(self): 3603 """Tests for cpp_style.is_exempt().""" 3604 self.assert_(not cpp_style.is_exempt('')) 3605 self.assert_(not cpp_style.is_exempt('foo.h')) 3606 self.assert_(not cpp_style.is_exempt('foo.hpp')) 3607 self.assert_(not cpp_style.is_exempt('foo.c')) 3608 self.assert_(not cpp_style.is_exempt('foo.cpp')) 3609 self.assert_(not cpp_style.is_exempt('-')) 3610 self.assert_(cpp_style.is_exempt('gtk2drawing.h')) 3611 self.assert_(cpp_style.is_exempt('WebCore/platform/gtk/gtk2drawing.h')) 3612 self.assert_(cpp_style.is_exempt('gtk2drawing.c')) 3613 self.assert_(cpp_style.is_exempt('WebCore/platform/gtk/gtk2drawing.c')) 3602 3614 3603 3615 def tearDown():
Note: See TracChangeset
for help on using the changeset viewer.