MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / FindHeader

Method FindHeader

src/tests/coding/cpplint.py:1113–1126  ·  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

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

Callers 1

CheckIncludeLineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected