Skip to content

Commit

Permalink
Fix #13014: GUI: wrong misra command if misra rule texts is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
swasti16 committed Aug 16, 2024
1 parent 35a0df1 commit 11de495
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,11 +1006,13 @@ QString MainWindow::loadAddon(Settings &settings, const QString &filesDir, const
const QString misraFile = fromNativePath(mSettings->value(SETTINGS_MISRA_FILE).toString());
if (!misraFile.isEmpty()) {
QString arg;
picojson::array arr;
if (misraFile.endsWith(".pdf", Qt::CaseInsensitive))
arg = "--misra-pdf=" + misraFile;
else
arg = "--rule-texts=" + misraFile;
obj["args"] = picojson::value(arg.toStdString());
arr.emplace_back(arg.toStdString());
obj["args"] = picojson::value(arr);
}
}

Expand Down

0 comments on commit 11de495

Please sign in to comment.