def RemoveExtraneous(line):
  """
  Remove extraneous data such as the optional 'Lines:' block at the end of some
  warnings, and line ending characters.
  This ensures better matching and makes for less cluttered results.
  """
  linesOffset = line.find(": Lines:")
  if linesOffset >= 0:
    line = line[:linesOffset]
  return line.strip()