(cppcheck_parameters:str, clang:str)
| 12 | CPPCHECK = os.path.expanduser('~/cppcheck/cppcheck') |
| 13 | |
| 14 | def run_cppcheck(cppcheck_parameters:str, clang:str): |
| 15 | cmd = '{} {} {} --debug --verbose'.format(CPPCHECK, cppcheck_parameters, clang) |
| 16 | #print(cmd) |
| 17 | with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p: |
| 18 | # TODO: handle p.returncode? |
| 19 | stdout, _ = p.communicate() |
| 20 | return stdout.decode('utf-8', 'ignore') |
| 21 | |
| 22 | |
| 23 | def get_ast(debug): |
no test coverage detected