clang fixes.
This commit is contained in:
27
xenia-build
27
xenia-build
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user