Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found.
(self, filename, error)
| 2661 | return None |
| 2662 | |
| 2663 | def CheckCompletedBlocks(self, filename, error): |
| 2664 | """Checks that all classes and namespaces have been completely parsed. |
| 2665 | |
| 2666 | Call this when all lines in a file have been processed. |
| 2667 | Args: |
| 2668 | filename: The name of the current file. |
| 2669 | error: The function to call with any errors found. |
| 2670 | """ |
| 2671 | # Note: This test can result in false positives if #ifdef constructs |
| 2672 | # get in the way of brace matching. See the testBuildClass test in |
| 2673 | # cpplint_unittest.py for an example of this. |
| 2674 | for obj in self.stack: |
| 2675 | if isinstance(obj, _ClassInfo): |
| 2676 | error(filename, obj.starting_linenum, 'build/class', 5, |
| 2677 | 'Failed to find complete declaration of class %s' % |
| 2678 | obj.name) |
| 2679 | elif isinstance(obj, _NamespaceInfo): |
| 2680 | error(filename, obj.starting_linenum, 'build/namespaces', 5, |
| 2681 | 'Failed to find complete declaration of namespace %s' % |
| 2682 | obj.name) |
| 2683 | |
| 2684 | |
| 2685 | def CheckForNonStandardConstructs(filename, clean_lines, linenum, |
no test coverage detected