-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Make QG runnable with 3.21, Add comprehensive unit tests and coverage reporting for WinCCOA_QualityChecks #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0df6ce7
867750a
a5ed3eb
fa389b8
8ecc4fb
022b794
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| // SPDX-License-Identifier: GPL-3.0-only | ||
| // | ||
|
|
||
| #uses "stdVar" | ||
| #uses "std" | ||
|
|
||
| class OaLogger | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ | |
| @note Call function calculate() before you want acces some file information. | ||
| C-tor does not read the file to eliminate performacne. | ||
| */ | ||
| class ScriptData | ||
| class QgCtrlCodeScriptData | ||
| { | ||
| //-------------------------------------------------------------------------------- | ||
| //@public members | ||
|
|
@@ -43,7 +43,7 @@ class ScriptData | |
| Default c-tor | ||
| @param filePath Full native path to file there shall be checked. | ||
| */ | ||
| public ScriptData(const string filePath = "") | ||
| public QgCtrlCodeScriptData(const string filePath = "") | ||
| { | ||
| setPath(filePath); | ||
| } | ||
|
|
@@ -166,7 +166,7 @@ class ScriptData | |
| */ | ||
| public static int getMaxCountOfFunctions() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.countOfFunctions"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.countOfFunctions"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The settings file is still named WinCCOA_QualityCheck\data\qualityGates\settings\ScriptData.json. Therefore, this and all other adjustments in the QgSettings constructor calls are unnecessary. They prevent the settings from being read.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. I will change it |
||
| return (int)settings.getHighLimit(DEFAULT_FUNCCOUNT_HIGH); | ||
| } | ||
|
|
||
|
|
@@ -177,7 +177,7 @@ class ScriptData | |
| */ | ||
| public static int getMinCountOfFunctions() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.countOfFunctions"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.countOfFunctions"); | ||
| return (int)settings.getLowLimit(DEFAULT_FUNCCOUNT_LOW); | ||
| } | ||
|
|
||
|
|
@@ -189,7 +189,7 @@ class ScriptData | |
| */ | ||
| public static int getMaxNLOC() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.NLOC"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.NLOC"); | ||
| return (int)settings.getHighLimit(DEFAULT_NLOC_HIGH); | ||
| } | ||
|
|
||
|
|
@@ -201,7 +201,7 @@ class ScriptData | |
| */ | ||
| public static int getMinNLOC() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.NLOC"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.NLOC"); | ||
| return (int)settings.getLowLimit(DEFAULT_NLOC_LOW); | ||
| } | ||
|
|
||
|
|
@@ -213,7 +213,7 @@ class ScriptData | |
| */ | ||
| public static float getMaxAvgCCN() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.avgCCN"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.avgCCN"); | ||
| return (float)settings.getHighLimit(DEFAULT_AVGCCN_HIGH); | ||
| } | ||
|
|
||
|
|
@@ -256,7 +256,7 @@ class ScriptData | |
|
|
||
| if (rc != 0) | ||
| { | ||
| DebugFTN("ScriptData", __FUNCTION__, "!!! check if lizard is installed", rc, args, stdErr); | ||
| DebugFTN("QgCtrlCodeScriptData", __FUNCTION__, "!!! check if lizard is installed", rc, args, stdErr); | ||
| return -2; | ||
| } | ||
|
|
||
|
|
@@ -353,7 +353,7 @@ class ScriptData | |
| */ | ||
| protected int validateIsCalucalted() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.isCalculated"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.isCalculated"); | ||
|
|
||
| if (settings.isEnabled()) | ||
| { | ||
|
|
@@ -389,7 +389,7 @@ class ScriptData | |
| */ | ||
| protected validateCountOfFunctions() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.countOfFunctions"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.countOfFunctions"); | ||
|
|
||
| if (settings.isEnabled()) | ||
| { | ||
|
|
@@ -413,7 +413,7 @@ class ScriptData | |
| { | ||
| if (getCountOfFunctions() > 1) // only when has more then 1 function | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.avgCCN"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.avgCCN"); | ||
|
|
||
| if (settings.isEnabled()) | ||
| { | ||
|
|
@@ -435,7 +435,7 @@ class ScriptData | |
| */ | ||
| protected validateNLOC() | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.NLOC"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.NLOC"); | ||
|
|
||
| if (settings.isEnabled()) | ||
| { | ||
|
|
@@ -458,7 +458,7 @@ class ScriptData | |
| { | ||
| if (getCountOfFunctions() > 1) // only when has more then 1 function | ||
| { | ||
| shared_ptr<QgSettings> settings = new QgSettings("ScriptData.script.avgNLOC"); | ||
| shared_ptr<QgSettings> settings = new QgSettings("QgCtrlCodeScriptData.script.avgNLOC"); | ||
|
|
||
| if (settings.isEnabled()) | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, the file name should be ScriptData.