in tools/license_header.py [0:0]
def process_folder(root, action):
excepts = []
for root, _, files in os.walk(root):
for f in files:
fname = os.path.normpath(os.path.join(root, f))
if not process_file(fname, action):
excepts.append(fname)
if action == 'check' and excepts:
logging.warning('The following files do not contain a valid license, '+
'you can use `python tools/license_header.py add [file]` to add'+
'them automatically: ')
for x in excepts:
logging.warning(x)
return False
return True