Verified Commit 71d86b57 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Avoid choosing false compile_commands.json file

I case the build dir is empty the current working dir will be selected
as the first possible dir where for the file is searched.
In case I am in the kate build dir, but open another project the
compile_commands.json file from kate would be chosen.
parent d16d48a9
......@@ -139,6 +139,9 @@ QString KateProjectCodeAnalysisToolClazy::compileCommandsDirectory() const
*/
QString compileCommandsDir;
for (const QString &path : possiblePaths) {
if (path.isEmpty()) {
continue;
}
const QString guessedPath = QDir(path).filePath(compCommandsFile);
const bool dirHasCompileComds = QFile::exists(guessedPath);
if (dirHasCompileComds) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment