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

Function __create_compile_commands

test/cli/proj2_test.py:21–26  ·  view source on GitHub ↗
(proj_dir)

Source from the content-addressed store, hash-verified

19 ' ^\n') % os.path.join('b', 'b.c')
20
21def __create_compile_commands(proj_dir):
22 proj_dir = str(proj_dir)
23 j = [{'directory': os.path.join(proj_dir, 'a'), 'command': 'gcc -c a.c', 'file': 'a.c'},
24 {'directory': proj_dir, 'command': 'gcc -c b/b.c', 'file': 'b/b.c'}]
25 with open(os.path.join(proj_dir, __COMPILE_COMMANDS_JSON), 'wt') as f:
26 f.write(json.dumps(j))
27
28
29def test_file_filter():

Callers 7

test_local_pathFunction · 0.70
test_local_path_forceFunction · 0.70
test_relative_pathFunction · 0.70
test_absolute_pathFunction · 0.70

Calls 3

strFunction · 0.85
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected