clang fixes.

This commit is contained in:
Ben Vanik
2015-08-01 02:51:49 -07:00
parent 49ad0fd0eb
commit 27944c425b
3 changed files with 24 additions and 11 deletions

View File

@@ -757,6 +757,23 @@ class NukeCommand(Command):
return 0
def find_all_source_files():
"""Gets all interesting source files in the project.
Returns:
A list of file paths.
"""
all_files = [os.path.join(root, name)
for root, dirs, files in os.walk('src')
for name in files
if name.endswith(('.cc', '.c', '.h', '.inl'))]
all_files = all_files + [os.path.join(root, name)
for root, dirs, files in os.walk('third_party/elemental-forms/src/')
for name in files
if name.endswith(('.cc', '.c', '.h', '.inl'))]
return all_files
class LintCommand(Command):
"""'lint' command."""
@@ -779,10 +796,7 @@ class LintCommand(Command):
difftemp = '.difftemp.txt'
if args['all']:
all_files = [os.path.join(root, name)
for root, dirs, files in os.walk('src')
for name in files
if name.endswith(('.cc', '.c', '.h', '.inl'))]
all_files = find_all_source_files()
print('- linting %d files' % (len(all_files)))
any_errors = False
for file_path in all_files:
@@ -876,10 +890,7 @@ class FormatCommand(Command):
clang_format_binary = get_clang_format_binary()
if args['all']:
all_files = [os.path.join(root, name)
for root, dirs, files in os.walk('src/')
for name in files
if name.endswith(('.cc', '.c', '.h', '.inl'))]
all_files = find_all_source_files()
print('- clang-format [%d files]' % (len(all_files)))
any_errors = False
for file_path in all_files: