def check_files()

in tools/check_boilerplate.py [0:0]


def check_files(root, files, errors, warnings):
  for fname in files:
    if fname in _MATCH_FILES or os.path.splitext(fname)[1] in _MATCH_FILES:
      fpath = os.path.abspath(os.path.join(root, fname))
      content = open(fpath).read()
      if _EXCLUDE_RE.search(content):
        continue
      try:
        if not _MATCH_RE.search(content):
          errors.append(fpath)
      except (IOError, OSError):
        warnings.append(fpath)