MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / __write_compdb

Function __write_compdb

test/cli/other_test.py:2163–2174  ·  view source on GitHub ↗
(tmpdir, test_file)

Source from the content-addressed store, hash-verified

2161
2162
2163def __write_compdb(tmpdir, test_file):
2164 compile_commands = os.path.join(tmpdir, 'compile_commands.json')
2165 j = [
2166 {
2167 'directory': os.path.dirname(test_file),
2168 'file': test_file,
2169 'command': 'gcc -c {}'.format(test_file)
2170 }
2171 ]
2172 with open(compile_commands, 'wt') as f:
2173 f.write(json.dumps(j))
2174 return compile_commands
2175
2176
2177def __test_ignore_project_2(tmpdir, extra_args, append=False, inject_path=False):

Callers 3

__test_ignore_project_2Function · 0.85
__test_clang_tidyFunction · 0.85

Calls 3

formatMethod · 0.80
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected