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

Method FindHeader

cpplint.py:1257–1270  ·  view source on GitHub ↗

Check if a header has already been included. Args: header: header to check. Returns: Line number of previous occurrence, or -1 if the header has not been seen before.

(self, header)

Source from the content-addressed store, hash-verified

1255 self.ResetSection("")
1256
1257 def FindHeader(self, header):
1258 """Check if a header has already been included.
1259
1260 Args:
1261 header: header to check.
1262 Returns:
1263 Line number of previous occurrence, or -1 if the header has not
1264 been seen before.
1265 """
1266 for section_list in self.include_list:
1267 for f in section_list:
1268 if f[0] == header:
1269 return f[1]
1270 return -1
1271
1272 def ResetSection(self, directive):
1273 """Reset section checking for preprocessor directive.

Callers 1

CheckIncludeLineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected