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
  _BSD2 = ["All rights reserved.", "", "Redistribution and use i...
  _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]


["All rights reserved.", "", "Redistribution and use in source and bin\
ary forms, with or without", "modification, are permitted provided tha\
t the following conditions are", "met:", "", "1. Redistributions of so\
urce code must retain the above copyright notice,", "this list of cond\
itions and the following disclaimer.", "", "2. Redistributions in bina\
ry form must reproduce the above copyright", "notice, this list of con\
ditions and the following disclaimer in the", "documentation and/or ot\
her materials provided with the distribution.", "", "THIS SOFTWARE IS \


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."