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

@ -27,12 +27,14 @@ git:
submodules: false
before_install:
- sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.7QGyKksfYF --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d//apt.postgresql.org.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 60C317803A41BA51845E371A1E9377A2BA9EF27F
- sudo add-apt-repository "deb http://llvm.org/apt/precise/ llvm-toolchain-precise main" -y
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-get update -qq
- sudo apt-get -yq update
install:
- sudo apt-get install -f clang-3.8 clang-format-3.8
- sudo apt-get -yq --force-yes install clang-3.8 clang-format-3.8
before_script:
# Dump useful info.

@ -1 +1 @@
Subproject commit 5478f60bb6e916b7fb2de93a51bf12f9be7c17aa
Subproject commit 1511edbc5a0512c403dd86db17b49837f9fff7e2

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: