|
|
@ -3,13 +3,14 @@ import re, os, sys
|
|
|
|
valid_extensions = ['c', 'cpp', 'h', 'hpp', 'mm', 'lua', 'rb', 'proto',
|
|
|
|
valid_extensions = ['c', 'cpp', 'h', 'hpp', 'mm', 'lua', 'rb', 'proto',
|
|
|
|
'init', 'init-example']
|
|
|
|
'init', 'init-example']
|
|
|
|
path_blacklist = [
|
|
|
|
path_blacklist = [
|
|
|
|
'library/include/df/',
|
|
|
|
'^library/include/df/',
|
|
|
|
'plugins/stonesense/allegro',
|
|
|
|
'^plugins/stonesense/allegro',
|
|
|
|
'plugins/isoworld/allegro',
|
|
|
|
'^plugins/isoworld/allegro',
|
|
|
|
'plugins/isoworld/agui',
|
|
|
|
'^plugins/isoworld/agui',
|
|
|
|
'depends/',
|
|
|
|
'^depends/',
|
|
|
|
'.git/',
|
|
|
|
'^.git/',
|
|
|
|
'build',
|
|
|
|
'^build',
|
|
|
|
|
|
|
|
'.pb.h',
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def valid_file(filename):
|
|
|
|
def valid_file(filename):
|
|
|
@ -93,7 +94,7 @@ def main():
|
|
|
|
sys.exit(2)
|
|
|
|
sys.exit(2)
|
|
|
|
fix = (len(sys.argv) > 2 and sys.argv[2] == '--fix')
|
|
|
|
fix = (len(sys.argv) > 2 and sys.argv[2] == '--fix')
|
|
|
|
global path_blacklist
|
|
|
|
global path_blacklist
|
|
|
|
path_blacklist = map(lambda s: os.path.join(root_path, s), path_blacklist)
|
|
|
|
path_blacklist = map(lambda s: os.path.join(root_path, s.replace('^', '')) if s.startswith('^') else s, path_blacklist)
|
|
|
|
|
|
|
|
|
|
|
|
for cur, dirnames, filenames in os.walk(root_path):
|
|
|
|
for cur, dirnames, filenames in os.walk(root_path):
|
|
|
|
for filename in filenames:
|
|
|
|
for filename in filenames:
|
|
|
|