Open
Description
In my cmake build system, compile_commands.json contains absolute paths both for "directory" and "source". So the script run-clang-tidy.py doesn't work here, when tries to calculates the absolute path of a source file joining "directory" and "file" paths.
I think the script assumes "file" path is always relative to "directory" path, but it isn't true in general.
One fix could be:
files = {e["file"] if os.path.isabs(e["file"]) else os.path.abspath(os.path.join(e["directory"], e["file"])) for e in database}