MCPcopy Create free account
hub / github.com/MyGUI/mygui / find_compilation_database

Function find_compilation_database

Scripts/run-clang-tidy.py:104–113  ·  view source on GitHub ↗

Adjusts the directory until a compilation database is found.

(path)

Source from the content-addressed store, hash-verified

102
103
104def find_compilation_database(path):
105 """Adjusts the directory until a compilation database is found."""
106 result = os.path.realpath('./')
107 while not os.path.isfile(os.path.join(result, path)):
108 parent = os.path.dirname(result)
109 if result == parent:
110 print('Error: could not find compilation database.')
111 sys.exit(1)
112 result = parent
113 return result
114
115
116def make_absolute(f, directory):

Callers 1

mainFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected