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

Method ResetSection

cpplint.py:1272–1288  ·  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

1270 return -1
1271
1272 def ResetSection(self, directive):
1273 """Reset section checking for preprocessor directive.
1274
1275 Args:
1276 directive: preprocessor directive (e.g. "if", "else").
1277 """
1278 # The name of the current section.
1279 self._section = self._INITIAL_SECTION
1280 # The path of last found header.
1281 self._last_header = ""
1282
1283 # Update list of includes. Note that we never pop from the
1284 # include list.
1285 if directive in ("if", "ifdef", "ifndef"):
1286 self.include_list.append([])
1287 elif directive in ("else", "elif"):
1288 self.include_list[-1] = []
1289
1290 def SetLastHeader(self, header_path):
1291 self._last_header = header_path

Callers 2

__init__Method · 0.95
CheckLanguageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected