diff --git a/cfg/zephyr.cfg b/cfg/zephyr.cfg new file mode 100644 index 000000000..999de4ea1 --- /dev/null +++ b/cfg/zephyr.cfg @@ -0,0 +1,113 @@ + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + 0:2147483647 + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gui/compliancereportdialog.cpp b/gui/compliancereportdialog.cpp index 64c365e65..43a1ef0f7 100644 --- a/gui/compliancereportdialog.cpp +++ b/gui/compliancereportdialog.cpp @@ -97,9 +97,11 @@ void ComplianceReportDialog::buttonClicked(QAbstractButton* button) void ComplianceReportDialog::save() { + const QString std(mUI->mCodingStandard->currentText().toLower().replace(" ", "-")); + const QString outFile = QFileDialog::getSaveFileName(this, tr("Compliance report"), - QDir::homePath() + "/misra-c-2012-compliance-report.html", + QDir::homePath() + "/" + std + "-compliance-report.html", tr("HTML files (*.html)")); if (outFile.isEmpty()) return; @@ -166,11 +168,18 @@ void ComplianceReportDialog::save() tempFiles.close(); } - QStringList args{"--compliant=misra-c2012-1.1", - "--compliant=misra-c2012-1.2", - "--project-name=" + projectName, + QStringList args{"--project-name=" + projectName, "--project-version=" + projectVersion, "--output-file=" + outFile}; + + if (std.startsWith("misra-c-")) { + args << "--misra-c" + << "--compliant=misra-c2012-1.1" + << "--compliant=misra-c2012-1.2"; + } else { + args << ("--" + std); + } + if (files) args << "--files=" + tempFiles.fileName(); args << mResultsFile; diff --git a/gui/compliancereportdialog.ui b/gui/compliancereportdialog.ui index 8e260c2dc..b65ef626e 100644 --- a/gui/compliancereportdialog.ui +++ b/gui/compliancereportdialog.ui @@ -16,26 +16,52 @@ - - - - Project name - - - - - - - + Project version + + + + Project name + + + + + + + + + + Coding Standard + + + + + + + + Misra C 2023 + + + + + Cert C + + + + + Cert C++ + + + +