MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / ResetSection

Method ResetSection

src/tests/coding/cpplint.py:1128–1144  ·  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

1126 return -1
1127
1128 def ResetSection(self, directive):
1129 """Reset section checking for preprocessor directive.
1130
1131 Args:
1132 directive: preprocessor directive (e.g. "if", "else").
1133 """
1134 # The name of the current section.
1135 self._section = self._INITIAL_SECTION
1136 # The path of last found header.
1137 self._last_header = ''
1138
1139 # Update list of includes. Note that we never pop from the
1140 # include list.
1141 if directive in ('if', 'ifdef', 'ifndef'):
1142 self.include_list.append([])
1143 elif directive in ('else', 'elif'):
1144 self.include_list[-1] = []
1145
1146 def SetLastHeader(self, header_path):
1147 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