MCPcopy Create free account
hub / github.com/alibaba/GraphScope / FindHeader

Method FindHeader

analytical_engine/misc/cpplint.py:1117–1130  ·  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

1115 self.ResetSection('')
1116
1117 def FindHeader(self, header):
1118 """Check if a header has already been included.
1119
1120 Args:
1121 header: header to check.
1122 Returns:
1123 Line number of previous occurrence, or -1 if the header has not
1124 been seen before.
1125 """
1126 for section_list in self.include_list:
1127 for f in section_list:
1128 if f[0] == header:
1129 return f[1]
1130 return -1
1131
1132 def ResetSection(self, directive):
1133 """Reset section checking for preprocessor directive.

Callers 1

CheckIncludeLineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected