Skip to content

Commit c546eed

Browse files
committed
Nits 3
1 parent 77dad57 commit c546eed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ std::string Config::matchFilenameFromCompileCommand()
173173

174174
}
175175

176-
return "File not found";
176+
return "";
177177
}
178178

179179
std::string Config::parseArgs(int argc, char **argv)
@@ -227,9 +227,10 @@ std::string Config::parseArgs(int argc, char **argv)
227227
m_filename = normalizePath(std::filesystem::current_path() / m_filename);
228228

229229
err = matchFilenameFromCompileCommand();
230+
231+
// Only warn if compile_commands.json is corrupted
230232
if (!err.empty())
231-
return
232-
"Failed to find matching file in compile_commands.json: " + err;
233+
return "Failed to process compile_commands.json: " + err;
233234

234235
return "";
235236
}

0 commit comments

Comments
 (0)