MCPcopy Create free account
hub / github.com/apache/mesos / FindHeader

Method FindHeader

support/cpplint.py:741–754  ·  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

739 self.ResetSection('')
740
741 def FindHeader(self, header):
742 """Check if a header has already been included.
743
744 Args:
745 header: header to check.
746 Returns:
747 Line number of previous occurrence, or -1 if the header has not
748 been seen before.
749 """
750 for section_list in self.include_list:
751 for f in section_list:
752 if f[0] == header:
753 return f[1]
754 return -1
755
756 def ResetSection(self, directive):
757 """Reset section checking for preprocessor directive.

Callers 1

CheckIncludeLineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected