mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
CI: skip external files for cppcheck
This commit is contained in:
parent
19491f0994
commit
b857664d27
2 changed files with 16 additions and 0 deletions
1
.github/workflows/cppcheck.yml
vendored
1
.github/workflows/cppcheck.yml
vendored
|
@ -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: |
|
||||
|
|
15
cppcheck/remove_external.py
Normal file
15
cppcheck/remove_external.py
Normal 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()
|
Loading…
Reference in a new issue