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 3484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3495 return | 3495 return |
3496 | 3496 |
3497 is_function_arguments = is_function_arguments or character_after_identif
ier == '(' | 3497 is_function_arguments = is_function_arguments or character_after_identif
ier == '(' |
3498 | 3498 |
3499 # Remove "m_" and "s_" to allow them. | 3499 # Remove "m_" and "s_" to allow them. |
3500 modified_identifier = sub(r'(^|(?<=::))[ms]_', '', identifier) | 3500 modified_identifier = sub(r'(^|(?<=::))[ms]_', '', identifier) |
3501 if not file_state.is_objective_c() and modified_identifier.find('_') >=
0: | 3501 if not file_state.is_objective_c() and modified_identifier.find('_') >=
0: |
3502 # Various exceptions to the rule: JavaScript op codes functions, con
st_iterator. | 3502 # Various exceptions to the rule: JavaScript op codes functions, con
st_iterator. |
3503 if (not (filename.find('JavaScriptCore') >= 0 and modified_identifie
r.find('op_') >= 0) | 3503 if (not (filename.find('JavaScriptCore') >= 0 and modified_identifie
r.find('op_') >= 0) |
3504 and not (filename.find('gtk') >= 0 and modified_identifier.s
tartswith('webkit_') >= 0) | 3504 and not (filename.find('gtk') >= 0 and modified_identifier.s
tartswith('webkit_') >= 0) |
| 3505 and not (filename.find('StructTraits.h') >= 0) |
3505 and not modified_identifier.startswith('tst_') | 3506 and not modified_identifier.startswith('tst_') |
3506 and not modified_identifier.startswith('webkit_dom_object_') | 3507 and not modified_identifier.startswith('webkit_dom_object_') |
3507 and not modified_identifier.startswith('webkit_soup') | 3508 and not modified_identifier.startswith('webkit_soup') |
3508 and not modified_identifier.startswith('NPN_') | 3509 and not modified_identifier.startswith('NPN_') |
3509 and not modified_identifier.startswith('NPP_') | 3510 and not modified_identifier.startswith('NPP_') |
3510 and not modified_identifier.startswith('NP_') | 3511 and not modified_identifier.startswith('NP_') |
3511 and not modified_identifier.startswith('qt_') | 3512 and not modified_identifier.startswith('qt_') |
3512 and not modified_identifier.startswith('_q_') | 3513 and not modified_identifier.startswith('_q_') |
3513 and not modified_identifier.startswith('cairo_') | 3514 and not modified_identifier.startswith('cairo_') |
3514 and not modified_identifier.startswith('Ecore_') | 3515 and not modified_identifier.startswith('Ecore_') |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4173 | 4174 |
4174 def check(self, lines): | 4175 def check(self, lines): |
4175 _process_lines(self.file_path, self.file_extension, lines, | 4176 _process_lines(self.file_path, self.file_extension, lines, |
4176 self.handle_style_error, self.min_confidence) | 4177 self.handle_style_error, self.min_confidence) |
4177 | 4178 |
4178 | 4179 |
4179 # FIXME: Remove this function (requires refactoring unit tests). | 4180 # FIXME: Remove this function (requires refactoring unit tests). |
4180 def process_file_data(filename, file_extension, lines, error, min_confidence, fs
=None): | 4181 def process_file_data(filename, file_extension, lines, error, min_confidence, fs
=None): |
4181 checker = CppChecker(filename, file_extension, error, min_confidence, fs) | 4182 checker = CppChecker(filename, file_extension, error, min_confidence, fs) |
4182 checker.check(lines) | 4183 checker.check(lines) |
OLD | NEW |