MCPcopy Index your code
hub / github.com/nodejs/node / ResetSection

Method ResetSection

tools/cpplint.py:1312–1328  ·  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

1310 return -1
1311
1312 def ResetSection(self, directive):
1313 """Reset section checking for preprocessor directive.
1314
1315 Args:
1316 directive: preprocessor directive (e.g. "if", "else").
1317 """
1318 # The name of the current section.
1319 self._section = self._INITIAL_SECTION
1320 # The path of last found header.
1321 self._last_header = ""
1322
1323 # Update list of includes. Note that we never pop from the
1324 # include list.
1325 if directive in ("if", "ifdef", "ifndef"):
1326 self.include_list.append([])
1327 elif directive in ("else", "elif"):
1328 self.include_list[-1] = []
1329
1330 def SetLastHeader(self, header_path):
1331 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