MCPcopy Create free account
hub / github.com/BVLC/caffe / CheckEnd

Method CheckEnd

scripts/cpp_lint.py:1838–1849  ·  view source on GitHub ↗
(self, filename, clean_lines, linenum, error)

Source from the content-addressed store, hash-verified

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
1852class _NamespaceInfo(_BlockInfo):

Callers

nothing calls this directly

Calls 1

MatchFunction · 0.85

Tested by

no test coverage detected