MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / ResetSection

Method ResetSection

steps/cpplint.py:1143–1159  ·  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

1141 return -1
1142
1143 def ResetSection(self, directive):
1144 """Reset section checking for preprocessor directive.
1145
1146 Args:
1147 directive: preprocessor directive (e.g. "if", "else").
1148 """
1149 # The name of the current section.
1150 self._section = self._INITIAL_SECTION
1151 # The path of last found header.
1152 self._last_header = ''
1153
1154 # Update list of includes. Note that we never pop from the
1155 # include list.
1156 if directive in ('if', 'ifdef', 'ifndef'):
1157 self.include_list.append([])
1158 elif directive in ('else', 'elif'):
1159 self.include_list[-1] = []
1160
1161 def SetLastHeader(self, header_path):
1162 self._last_header = header_path

Callers 2

__init__Method · 0.95
CheckLanguageFunction · 0.80

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected