Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions foedus-core/tools/cpplint-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import subprocess
import sys
import time
import tempfile
import unicodedata


Expand Down Expand Up @@ -177,14 +178,18 @@ def exec_cpplint(files, cpplint_arguments):
sys.stdout.write('Launching cpplint for ' + str(len(index_now)) + ' files.\n')
# sys.stdout.write('arguments: ' + ' '.join(args) + '\n')
# sys.stdout.write('Launching cpplint (' + cpplint_file + ') for ' + str(len(files))
# + ' files. arguments: ' + ' '.join(args) + '\n')
proc = subprocess.Popen(args, bufsize=65536, stderr=subprocess.PIPE, close_fds=True)
# + ' files. arguments: ' + ' '.join(args) + '\n')

tmpfile = tempfile.TemporaryFile()
proc = subprocess.Popen(args, bufsize=65536, stderr=tmpfile, close_fds=True)
proc.wait()
# go to first line of tmpfile
tmpfile.seek(0)
has_error = False
clean_index = {}
clean_index.update(index_last)
clean_index.update(index_now)
for line in proc.stderr:
for line in tmpfile:
# This is annoying. Why cpplint writes this to _stderr_??
if not line.startswith("Done processing "):
has_error = True
Expand Down