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

Method FindHeader

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

1295 self.ResetSection("")
1296
1297 def FindHeader(self, header):
1298 """Check if a header has already been included.
1299
1300 Args:
1301 header: header to check.
1302 Returns:
1303 Line number of previous occurrence, or -1 if the header has not
1304 been seen before.
1305 """
1306 for section_list in self.include_list:
1307 for f in section_list:
1308 if f[0] == header:
1309 return f[1]
1310 return -1
1311
1312 def ResetSection(self, directive):
1313 """Reset section checking for preprocessor directive.

Callers 1

CheckIncludeLineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected