MCPcopy Create free account
hub / github.com/apache/mesos / ResetSection

Method ResetSection

support/cpplint.py:756–772  ·  view source on GitHub ↗

Reset section checking for preprocessor directive. Args: directive: preprocessor directive (e.g. "if", "else").

(self, directive)

Source from the content-addressed store, hash-verified

754 return -1
755
756 def ResetSection(self, directive):
757 """Reset section checking for preprocessor directive.
758
759 Args:
760 directive: preprocessor directive (e.g. "if", "else").
761 """
762 # The name of the current section.
763 self._section = self._INITIAL_SECTION
764 # The path of last found header.
765 self._last_header = ''
766
767 # Update list of includes. Note that we never pop from the
768 # include list.
769 if directive in ('if', 'ifdef', 'ifndef'):
770 self.include_list.append([])
771 elif directive in ('else', 'elif'):
772 self.include_list[-1] = []
773
774 def SetLastHeader(self, header_path):
775 self._last_header = header_path

Callers 2

__init__Method · 0.95
CheckLanguageFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected