def RunLintOverAllFiles(linter, filenames):
  """Runs linter over the contents of all files.

  Args:
    lint: subclass of BaseLint, implementing RunOnFile()
    filenames: list of all files whose contents will be linted

  Returns:
    A list of tuples with format [(filename, line number, msg), ...] with any
    violations found.
  """
  lint = []
  for filename in filenames:
    file = open(filename, 'r')
    if not file:
      print('Cound not open %s' % filename)
      continue
    lines = file.readlines()
    lint.extend(linter.RunOnFile(filename, lines))

  return lint