Script check_header
[hide private]
[frames] | no frames]

Script check_header

Script to verify file header.

Classes [hide private]
Functions [hide private]
_Fail(lineno, msg)
Main program.
Variables [hide private]
  _READ_SIZE = 8* 1024
Assume header is always in the first 8kB of a file
  _GPLv2 = ["This program is free software; you can redistribute...
  _SHEBANG = re.compile(r"^#(?:|!(?:/usr/bin/python(?:| -u)|/bin...
  _COPYRIGHT_YEAR = r"20[01][0-9]"
  _COPYRIGHT = re.compile(r"# Copyright \(C\) (%s(?:, %s)*) Goog...
  _COPYRIGHT_DESC = "Copyright (C) <year>[, <year> ...] Google I...
  _AUTOGEN = "# This file is automatically generated, do not edit!"

Imports: sys, re, itertools, constants, utils, compat

Variables Details [hide private]


["This program is free software; you can redistribute it and/or modify\
", "it under the terms of the GNU General Public License as published \
by", "the Free Software Foundation; either version 2 of the License, o\
r", "(at your option) any later version.", "", "This program is distri\
buted in the hope that it will be useful, but", "WITHOUT ANY WARRANTY;\
 without even the implied warranty of", "MERCHANTABILITY or FITNESS FO\
R A PARTICULAR PURPOSE.  See the GNU", "General Public License for mor\
e details.", "", "You should have received a copy of the GNU General P\


re.compile(r"^#(?:|!(?:/usr/bin/python(?:| -u)|/bin/(?:|ba)sh))$")


re.compile(r"# Copyright \(C\) (%s(?:, %s)*) Google Inc\.$" %(_COPYRIG\


"Copyright (C) <year>[, <year> ...] Google Inc."