Changeset 56763 in webkit
- Timestamp:
- Mar 29, 2010 11:08:34 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r56762 r56763 1 2010-03-29 Hayato Ito <hayato@chromium.org> 2 3 Reviewed by Shinichiro Hamaji. 4 5 Remove '_flymake' suffix from base part of file name so that 6 check-webkit-style uses a correct header guard name when it is called from Emacs's flymake. 7 8 https://bugs.webkit.org/show_bug.cgi?id=36573 9 10 * Scripts/webkitpy/style/processors/cpp.py: 11 * Scripts/webkitpy/style/processors/cpp_unittest.py: 12 1 13 2010-03-29 Chris Jerdonek <cjerdonek@webkit.org> 2 14 -
trunk/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
r56692 r56763 642 642 643 643 """ 644 645 # Restores original filename in case that style checker is invoked from Emacs's 646 # flymake. 647 filename = re.sub(r'_flymake\.h$', '.h', filename) 644 648 645 649 return sub(r'[-.\s]', '_', os.path.basename(filename)) … … 2770 2774 # e.g. If the file name is 'foo_flymake.cpp', we should search for 'foo.h' 2771 2775 # instead of 'foo_flymake.h' 2772 emacs_flymake_suffix = '_flymake.cpp' 2773 if abs_filename.endswith(emacs_flymake_suffix): 2774 abs_filename = abs_filename[:-len(emacs_flymake_suffix)] + '.cpp' 2776 abs_filename = re.sub(r'_flymake\.cpp$', '.cpp', abs_filename) 2775 2777 2776 2778 # include_state is modified during iteration, so we iterate over a copy of -
trunk/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
r56692 r56763 1737 1737 error_collector.result_list()) 1738 1738 1739 # Special case for flymake 1740 error_collector = ErrorCollector(self.assert_) 1741 self.process_file_data('mydir/Foo_flymake.h', 'h', 1742 ['#ifndef %s' % expected_guard, 1743 '#define %s' % expected_guard, 1744 '#endif // %s' % expected_guard], 1745 error_collector) 1746 for line in error_collector.result_list(): 1747 if line.find('build/header_guard') != -1: 1748 self.fail('Unexpected error: %s' % line) 1749 1750 error_collector = ErrorCollector(self.assert_) 1751 self.process_file_data('mydir/Foo_flymake.h', 'h', [], error_collector) 1752 self.assertEquals( 1753 1, 1754 error_collector.result_list().count( 1755 'No #ifndef header guard found, suggested CPP variable is: %s' 1756 ' [build/header_guard] [5]' % expected_guard), 1757 error_collector.result_list()) 1758 1739 1759 def test_build_printf_format(self): 1740 1760 self.assert_lint(
Note: See TracChangeset
for help on using the changeset viewer.