CI: skip external files for cppcheck

This commit is contained in:
SChernykh 2023-06-16 11:02:56 +02:00
parent 19491f0994
commit b857664d27
2 changed files with 16 additions and 0 deletions

View file

@ -39,6 +39,7 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
python ../cppcheck/remove_external.py compile_commands.json
- name: Run cppcheck
run: |

View file

@ -0,0 +1,15 @@
import sys
import json
f = open(sys.argv[1])
data = json.load(f)
f.close()
v = []
for el in data:
if not ("/external/" in el['file']):
v.append(el)
f = open(sys.argv[1], 'w')
json.dump(v, f, indent=2)
f.close()