We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6d069e commit 81a51bcCopy full SHA for 81a51bc
1 file changed
cpp-linter/src/clang_tools/mod.rs
@@ -140,7 +140,15 @@ pub async fn capture_clang_tools_output(
140
141
// parse database (if provided) to match filenames when parsing clang-tidy's stdout
142
if let Some(db_path) = &clang_params.database
143
- && let Ok(db_str) = fs::read(db_path.join("compile_commands.json"))
+ && let Ok(db_str) = fs::read(
144
+ if db_path.is_relative() {
145
+ clang_params.repo_root.join(db_path)
146
+ } else {
147
+ db_path.to_path_buf()
148
+ }
149
+ .join(db_path)
150
+ .join("compile_commands.json"),
151
+ )
152
{
153
clang_params.database_json = Some(
154
// A compilation database should be UTF-8 encoded, but file paths are not; use lossy conversion.
0 commit comments