| 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 ' (error triggered by exceeding %d lines).' % ( | 611 ' (error triggered by exceeding %d lines).' % ( |
| 612 self.current_function, self.lines_in_function, trigger)) | 612 self.current_function, self.lines_in_function, trigger)) |
| 613 | 613 |
| 614 def end(self): | 614 def end(self): |
| 615 """Stop analyzing function body.""" | 615 """Stop analyzing function body.""" |
| 616 self.in_a_function = False | 616 self.in_a_function = False |
| 617 | 617 |
| 618 | 618 |
| 619 class _IncludeError(Exception): | 619 class _IncludeError(Exception): |
| 620 """Indicates a problem with the include order in a file.""" | 620 """Indicates a problem with the include order in a file.""" |
| 621 pass | |
| 622 | 621 |
| 623 | 622 |
| 624 class FileInfo: | 623 class FileInfo: |
| 625 """Provides utility functions for filenames. | 624 """Provides utility functions for filenames. |
| 626 | 625 |
| 627 FileInfo provides easy access to the components of a file's path | 626 FileInfo provides easy access to the components of a file's path |
| 628 relative to the project root. | 627 relative to the project root. |
| 629 """ | 628 """ |
| 630 | 629 |
| 631 def __init__(self, filename): | 630 def __init__(self, filename): |
| (...skipping 3581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4213 | 4212 |
| 4214 def check(self, lines): | 4213 def check(self, lines): |
| 4215 _process_lines(self.file_path, self.file_extension, lines, | 4214 _process_lines(self.file_path, self.file_extension, lines, |
| 4216 self.handle_style_error, self.min_confidence) | 4215 self.handle_style_error, self.min_confidence) |
| 4217 | 4216 |
| 4218 | 4217 |
| 4219 # FIXME: Remove this function (requires refactoring unit tests). | 4218 # FIXME: Remove this function (requires refactoring unit tests). |
| 4220 def process_file_data(filename, file_extension, lines, error, min_confidence, fs
=None): | 4219 def process_file_data(filename, file_extension, lines, error, min_confidence, fs
=None): |
| 4221 checker = CppChecker(filename, file_extension, error, min_confidence, fs) | 4220 checker = CppChecker(filename, file_extension, error, min_confidence, fs) |
| 4222 checker.check(lines) | 4221 checker.check(lines) |
| OLD | NEW |