Skip to content

Commit

Permalink
Remove debug prints and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
rwols committed Aug 26, 2017
1 parent e81923b commit d5f8ce0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ def handle_compdb(self):
headerdb = make_headerdb([[db]])[0]
db = list(db._data)
db.extend(headerdb.get_all_compile_commands())
print(db)
path = os.path.join(self.cmake.build_folder, "compile_commands.json")
with open(path, "w") as f:
json.dump(
Expand Down
7 changes: 3 additions & 4 deletions support/headerdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ def extract_include_dirs(compile_command):
header_search_path.append(command[i][2:])
i += 1
return [
os.path.join(compile_command.directory, p)
for p in header_search_path
os.path.join(compile_command.directory, p) for p in header_search_path
]


Expand Down Expand Up @@ -208,9 +207,9 @@ def __init__(self, score=0, compile_command=None, db_idx=-1):

def _make_headerdb1(compile_commands_iter, db_files, db_idx, header_mapping):
for compile_command in compile_commands_iter:
print(compile_command.__class__.__name__, compile_command)
if isinstance(compile_command, dict):
compile_command = JSONCompilationDatabase._dict_to_compile_command(compile_command)
compile_command = JSONCompilationDatabase._dict_to_compile_command(
compile_command)
implicit_search_path = get_implicit_header_search_path(compile_command)
header_search_paths = extract_include_dirs(compile_command)
src_file = compile_command.normfile
Expand Down

0 comments on commit d5f8ce0

Please sign in to comment.