Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WinCCOA_QualityChecks/data/ctrlPpCheck/rule/ctrl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
</rule>
<rule version="1">
<tokenlist>raw</tokenlist>
<pattern>makeError \( \S+ , \S+ , \S+ , 0 </pattern>
<pattern>makeError \( \S+ , 0 </pattern>
<message>
<id>fatal_program_exit</id>
<severity>warning</severity>
Expand Down
2 changes: 0 additions & 2 deletions WinCCOA_QualityChecks/msg/de_AT.utf8/QgBase.cat
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
00001,QualityGates does not run successfully !!!
00010,Assertion return error: $1
00011,Assertion works: $1
00020,The function $1 is not implemented.
00021,Start quality gate $1.
00022,Calculate sources for quality gate $1.
Expand Down
28 changes: 26 additions & 2 deletions WinCCOA_QualityChecks/msg/de_AT.utf8/QgCtrlppCheck.cat
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
assert.hasErr,$file
reason.hasErr,$errText
# an Ctrlppcheck error may contains following keys
# possible values
# id
# severity
# msg
# verbose
# path
# path0
# line
# cwe
# special case for logging
# relPath - relative path in unix format

#assertions are per severity (error, warning, style, performance, portability or information)
assert.has_error,ERROR in $relPath at line $line
reason.has_error,$msg ($id)
assert.has_warning,WARNING in $relPath at line $line
reason.has_warning,$msg ($id)
assert.has_style,STYLE in $relPath at line $line
reason.has_style,$msg ($id)
assert.has_performance,PERFORMANCE in $relPath at line $line
reason.has_performance,$msg ($id)
assert.has_portability,PORTABILITY in $relPath at line $line
reason.has_portability,$msg ($id)
assert.has_information,INFO in $relPath at line $line
reason.has_information,$msg ($id)
3 changes: 3 additions & 0 deletions WinCCOA_QualityChecks/msg/de_AT.utf8/QgResult.cat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00001,Assertion return error: $1
00002,Assertion works: $1
00003,Assertion return an acceptable error (known bug): $1
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
assert.isCheater,Check if file $location is overloaded.
reason.isCheater,It is not allowed to overwrite WinCCOA-license check files: $file.name
filesList,Files
filesList,Check files in $projectPath
# possible dollars
# location - checked file relative path in Linux format
# file.name - file name
# file.isOverloadedFrom - the overloaded file (form sub project or WinCC OA)
assert.isOverloaded,Check if file $location is overloaded.
reason.isOverloaded,The file '$file.name' is overloaded from '$file.isOverloadedFrom'.
assert.isOverloadedAllowed,Check if file $location is overloaded (allowed overloads).
Expand Down
3 changes: 3 additions & 0 deletions WinCCOA_QualityChecks/msg/de_AT.utf8/QgSyntaxCheck.cat
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

syntaxMsgs

assert.missingFiles,Has files
reason.missingFiles,Application doesn´t contain any scripts, libs or panels.
syntaxMsgs,Details
Expand Down
2 changes: 0 additions & 2 deletions WinCCOA_QualityChecks/msg/en_US.utf8/QgBase.cat
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
00001,QualityGates does not run successfully !!!
00010,Assertion return error: $1
00011,Assertion works: $1
00020,The function $1 is not implemented.
00021,Start quality gate $1.
00022,Calculate sources for quality gate $1.
Expand Down
28 changes: 26 additions & 2 deletions WinCCOA_QualityChecks/msg/en_US.utf8/QgCtrlppCheck.cat
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
assert.hasErr,$file
reason.hasErr,$errText
# an Ctrlppcheck error may contains following keys
# possible values
# id
# severity
# msg
# verbose
# path
# path0
# line
# cwe
# special case for logging
# relPath - relative path in unix format

#assertions are per severity (error, warning, style, performance, portability or information)
assert.has_error,ERROR in $relPath at line $line
reason.has_error,$msg ($id)
assert.has_warning,WARNING in $relPath at line $line
reason.has_warning,$msg ($id)
assert.has_style,STYLE in $relPath at line $line
reason.has_style,$msg ($id)
assert.has_performance,PERFORMANCE in $relPath at line $line
reason.has_performance,$msg ($id)
assert.has_portability,PORTABILITY in $relPath at line $line
reason.has_portability,$msg ($id)
assert.has_information,INFO in $relPath at line $line
reason.has_information,$msg ($id)
3 changes: 3 additions & 0 deletions WinCCOA_QualityChecks/msg/en_US.utf8/QgResult.cat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00001,Assertion return error: $1
00002,Assertion works: $1
00003,Assertion return an acceptable error (known bug): $1
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
assert.isCheater,Check if file $location is overloaded.
reason.isCheater,It is not allowed to overwrite WinCCOA-license check files: $file.name
filesList,Files
filesList,Check files in $projectPath
# possible dollars
# location - checked file relative path in Linux format
# file.name - file name
# file.isOverloadedFrom - the overloaded file (form sub project or WinCC OA)
assert.isOverloaded,Check if file $location is overloaded.
reason.isOverloaded,The file '$file.name' is overloaded from '$file.isOverloadedFrom'.
assert.isOverloadedAllowed,Check if file $location is overloaded (allowed overloads).
Expand Down
57 changes: 0 additions & 57 deletions WinCCOA_QualityChecks/scripts/QgTemplate.ctl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#uses "classes/QualityGates/Qg"
#uses "classes/QualityGates/QgBase"
#uses "classes/QualityGates/QgOverloadedFilesCheck/QgOverloadedFilesCheck"
#uses "classes/QualityGates/QgResult"

//--------------------------------------------------------------------------------
// declare variables and constans
Expand All @@ -32,7 +33,7 @@ class QgStaticCheck_OverloadedFiles : QgBase
if (QgBase::setUp())
return -1;

QgVersionResult::showErrorsOnly = TRUE;
QgResult::showErrorsOnly = TRUE;
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class QgStaticPanelCheck : QgBase
_panels.setDir(this.checkedPath + PANELS_REL_PATH);

if (!_panels.exists())
setMinValidScore("QgStaticCheck_Panels", "assert.missingPanels", "reason.missingPanels");
this.setMinValidScore("QgStaticCheck_Panels", "missingPanels");

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class QgStaticCheck_Pictures : QgBase
_pictures.setDir(this.checkedPath);

if (!_pictures.exists())
setMinValidScore("QgStaticCheck_Pictures", "assert.missingPictures", "reason.missingPictures");
this.setMinValidScore("QgStaticCheck_Pictures", "missingPictures");

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class QgStaticCheck_Scripts : QgBase
{
this.checkedPath = PROJ_PATH + SCRIPTS_REL_PATH;
}
else if (isdir(this.checkedPath + SCRIPTS_REL_PATH))
{
this.checkedPath = this.checkedPath + SCRIPTS_REL_PATH;
}

_scriptsData.setDir(this.checkedPath);
_scriptsData.setType(ScriptsDataType::scripts);
Expand All @@ -54,13 +58,19 @@ class QgStaticCheck_Scripts : QgBase
{
this.checkedPath = PROJ_PATH + LIBS_REL_PATH;
}
else if (isdir(this.checkedPath + LIBS_REL_PATH))
{
this.checkedPath = this.checkedPath + LIBS_REL_PATH;
}

_scriptsData.setDir(this.checkedPath);
_scriptsData.setType(ScriptsDataType::libs);
}

ogger.info(0, "Path to check", this.checkedPath));

if (!_scriptsData.exists())
setMinValidScore(Qg::getId(), "assert.missingScripts", "reason.missingScripts");
this.setMinValidScore(Qg::getId(), "missingScripts");

return 0;
}
Expand All @@ -81,7 +91,7 @@ class QgStaticCheck_Scripts : QgBase
isdir(this.checkedPath + LIBS_REL_PATH) && (_scriptsData.getCountOfSubDirs() <= 0))
{
// there are no scripts. Libs only and libs are checked in QgStaticCheck_Libs
setMinValidScore("QgStaticCheck_Scripts", "assert.missingScripts", "reason.missingScripts");
this.setMinValidScore("QgStaticCheck_Scripts", "missingScripts");
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

#uses "classes/FileSys/QgDir"
#uses "classes/QualityGates/Qg"
#uses "classes/QualityGates/QgApp"
#uses "classes/QualityGates/AddOn/FileSys/QgAddOnSourceDir"
#uses "classes/QualityGates/QgTest"

class QgAddOnResultsDir
{
Expand Down Expand Up @@ -100,18 +99,15 @@ class QgAddOnResultsDir

public string getDirPath()
{
if (_resultDir == "")
if (_resultDir != "")
return _resultDir;

if (!QgTest::isStartedByTestFramework())
{
if (!Qg::isRunningOnJenkins())
{
// projPath should be used, when Jenkins is not used
_resultDir = makeNativePath(PROJ_PATH + DATA_REL_PATH + "QualityGates/" + _qgId + "/" + _buildNo + "/");
}
else
{
QgApp app = QgApp::getAppFromProjName(PROJ);
_resultDir = makeNativePath(app.getSourcePath() + "QgResult/" + Qg::getId() + "/");
}
// When you start some locale tests, proj path will be used
// the test-framework does not need it, because results are stored in
// test-framework comform format automatically.
_resultDir = makeNativePath(PROJ_PATH + DATA_REL_PATH + "QualityGates/" + _qgId + "/" + _buildNo + "/");
}

return _resultDir;
Expand Down

This file was deleted.

This file was deleted.

Loading