MCPcopy Index your code
hub / github.com/cpplint/cpplint / InnermostClass

Method InnermostClass

cpplint.py:3639–3649  ·  view source on GitHub ↗

Get class info on the top of the stack. Returns: A _ClassInfo object if we are inside a class, or None otherwise.

(self)

Source from the content-addressed store, hash-verified

3637 line = matched.group(2)
3638
3639 def InnermostClass(self):
3640 """Get class info on the top of the stack.
3641
3642 Returns:
3643 A _ClassInfo object if we are inside a class, or None otherwise.
3644 """
3645 for i in range(len(self.stack), 0, -1):
3646 classinfo = self.stack[i - 1]
3647 if isinstance(classinfo, _ClassInfo):
3648 return classinfo
3649 return None
3650
3651
3652def CheckForNonStandardConstructs(filename, clean_lines, linenum, nesting_state, error):

Callers 3

testClassMethod · 0.80
CheckStyleFunction · 0.80

Calls

no outgoing calls

Tested by 1

testClassMethod · 0.64