| 1836 | self.is_derived = True |
| 1837 | |
| 1838 | def CheckEnd(self, filename, clean_lines, linenum, error): |
| 1839 | # Check that closing brace is aligned with beginning of the class. |
| 1840 | # Only do this if the closing brace is indented by only whitespaces. |
| 1841 | # This means we will not check single-line class definitions. |
| 1842 | indent = Match(r'^( *)\}', clean_lines.elided[linenum]) |
| 1843 | if indent and len(indent.group(1)) != self.class_indent: |
| 1844 | if self.is_struct: |
| 1845 | parent = 'struct ' + self.name |
| 1846 | else: |
| 1847 | parent = 'class ' + self.name |
| 1848 | error(filename, linenum, 'whitespace/indent', 3, |
| 1849 | 'Closing brace should be aligned with beginning of %s' % parent) |
| 1850 | |
| 1851 | |
| 1852 | class _NamespaceInfo(_BlockInfo): |