Commit 35629fb7 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

project clazy tool: Fix clazy plugin in case build dir is outside of source

The build dir was checked instead of the path variants defined above.
Also use QDir::filePath to make it a bit simpler.
parent 93d8c2a1
......@@ -141,13 +141,11 @@ QString KateProjectCodeAnalysisToolClazy::compileCommandsDirectory() const
* Check all paths one by one for compile_commands.json and exit when found
QString compileCommandsDir;
for (QString path : possiblePaths) {
if (!path.endsWith(QLatin1Char('/'))) {
const bool dirHasCompileComds = QFile::exists(buildDir + compCommandsFile);
for (const QString &path : possiblePaths) {
const QString guessedPath = QDir(path).filePath(compCommandsFile);
const bool dirHasCompileComds = QFile::exists(guessedPath);
if (dirHasCompileComds) {
compileCommandsDir = path;
compileCommandsDir = guessedPath;
Supports Markdown
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