| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 # | 2 # |
| 3 # Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved. | 3 # Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved. |
| 4 # Copyright (C) 2009 Torch Mobile Inc. | 4 # Copyright (C) 2009 Torch Mobile Inc. |
| 5 # Copyright (C) 2009 Apple Inc. All rights reserved. | 5 # Copyright (C) 2009 Apple Inc. All rights reserved. |
| 6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) | 6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) |
| 7 # | 7 # |
| 8 # Redistribution and use in source and binary forms, with or without | 8 # Redistribution and use in source and binary forms, with or without |
| 9 # modification, are permitted provided that the following conditions are | 9 # modification, are permitted provided that the following conditions are |
| 10 # met: | 10 # met: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 # http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py | 35 # http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py |
| 36 | 36 |
| 37 """Support for check-webkit-style.""" | 37 """Support for check-webkit-style.""" |
| 38 | 38 |
| 39 import math # for log | 39 import math # for log |
| 40 import os | 40 import os |
| 41 import os.path | 41 import os.path |
| 42 import re | 42 import re |
| 43 import sre_compile | 43 import sre_compile |
| 44 import string | 44 import string |
| 45 import sys | |
| 46 import unicodedata | 45 import unicodedata |
| 47 | 46 |
| 48 from webkitpy.common.memoized import memoized | 47 from webkitpy.common.memoized import memoized |
| 49 from webkitpy.common.system.filesystem import FileSystem | 48 from webkitpy.common.system.filesystem import FileSystem |
| 50 | 49 |
| 51 # Headers that we consider STL headers. | 50 # Headers that we consider STL headers. |
| 52 _STL_HEADERS = frozenset([ | 51 _STL_HEADERS = frozenset([ |
| 53 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception', | 52 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception', |
| 54 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set', | 53 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set', |
| 55 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'pair.h', | 54 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'pair.h', |
| (...skipping 4134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4190 | 4189 |
| 4191 def check(self, lines): | 4190 def check(self, lines): |
| 4192 _process_lines(self.file_path, self.file_extension, lines, | 4191 _process_lines(self.file_path, self.file_extension, lines, |
| 4193 self.handle_style_error, self.min_confidence) | 4192 self.handle_style_error, self.min_confidence) |
| 4194 | 4193 |
| 4195 | 4194 |
| 4196 # FIXME: Remove this function (requires refactoring unit tests). | 4195 # FIXME: Remove this function (requires refactoring unit tests). |
| 4197 def process_file_data(filename, file_extension, lines, error, min_confidence, fs
=None): | 4196 def process_file_data(filename, file_extension, lines, error, min_confidence, fs
=None): |
| 4198 checker = CppChecker(filename, file_extension, error, min_confidence, fs) | 4197 checker = CppChecker(filename, file_extension, error, min_confidence, fs) |
| 4199 checker.check(lines) | 4198 checker.check(lines) |
| OLD | NEW |