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