-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add clang-tidy step to build-and-test
Signed-off-by: Autumn60 <[email protected]>
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import json | ||
import os | ||
|
||
|
||
def merge_compile_commands(output_file): | ||
"""Merge all compile_commands.json files into one.""" | ||
compile_commands = [] | ||
for root, dirs, files in os.walk("."): | ||
if "compile_commands.json" in files: | ||
with open(os.path.join(root, "compile_commands.json"), "r") as f: | ||
compile_commands.extend(json.load(f)) | ||
with open(output_file, "w") as f: | ||
json.dump(compile_commands, f, indent=2) | ||
|
||
|
||
if __name__ == "__main__": | ||
merge_compile_commands("compile_commands.json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters