diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e05cf62fc3b072f64ad1ab3710a8bbadfbc4e00..a6fd1c46b5164e0b1c2f0b4a90b4e6c105da3fc0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -283,6 +283,7 @@ clang-tidy: - mkdir -p build_clang_tidy - cd build_clang_tidy - cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_VF_CPU=ON -DBUILD_VF_GPU=OFF + - ./utilities/filterCompileCommands.py compile_commands.json - run-clang-tidy -quiet > clang-tidy-results.txt artifacts: diff --git a/utilities/filterCompileCommands.py b/utilities/filterCompileCommands.py new file mode 100644 index 0000000000000000000000000000000000000000..e470826f65f2fa16db52d0437446b8a56ee62a48 --- /dev/null +++ b/utilities/filterCompileCommands.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import json +import sys + + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("usage: ./filterCompileCommands.py compile_commands.json") + exit(-1) + + filename = sys.argv[1] + print("loading compile commands file: {}".format(filename)) + + fin = open(filename, "r") + cc = json.load(fin) + fin.close() + + print("compile commands read: {}".format(len(cc))) \ No newline at end of file