Skip to content

Commit b7d9059

Browse files
spcaipers-armthorstendb-ARMedriouk
authored
[packchk] --xsd option checks schema compliance for pdsc files listed as dependencies (-i) as well #1716 #1132 (#1133) (#1957)
Skip -i included pdsc files for XSD check See #1716 Co-authored-by: Thorsten de Buhr <[email protected]> Co-authored-by: Evgueni Driouk <[email protected]>
1 parent 8b62d0a commit b7d9059

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tools/packchk/include/CreateModel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CreateModel
2424
~CreateModel();
2525

2626
bool CheckForOtherPdscFiles(const std::string& pdscFullPath);
27-
bool AddPdsc(const std::string& pdscFile, bool bSkipCheckForOtherPdsc = false);
27+
bool AddPdsc(const std::string& pdscFile, bool bSkipCheckForOtherPdsc = false, bool validatePdsc = false);
2828
bool AddRefPdsc(const std::set<std::string>& pdscRefFiles);
2929
bool SetPackXsd(const std::string& packXsdFile);
3030
bool ReadAllPdsc();

tools/packchk/src/CreateModel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ bool CreateModel::PrintPdscFiles(std::list<std::string>& pdscFiles)
9191
* @param bSkipCheckForOtherPdsc skip check if there are other PDSC files in package
9292
* @return passed / failed
9393
*/
94-
bool CreateModel::AddPdsc(const string& pdscFile, bool bSkipCheckForOtherPdsc /* = false */)
94+
bool CreateModel::AddPdsc(const string& pdscFile, bool bSkipCheckForOtherPdsc /* = false */, bool validatePdsc /* = false */)
9595
{
9696
if(pdscFile.empty()) {
9797
LogMsg("M202");
@@ -116,7 +116,7 @@ bool CreateModel::AddPdsc(const string& pdscFile, bool bSkipCheckForOtherPdsc /*
116116
}
117117
}
118118

119-
if(m_validatePdsc) {
119+
if(m_validatePdsc && validatePdsc) {
120120
if(!XmlChecker::Validate(pdscFile, m_schemaFile)) {
121121
; // continue checking
122122
}

tools/packchk/src/PackChk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ bool PackChk::CheckPackage()
101101

102102
// Add PDSC files to check (currently limited to one)
103103
const string& pdscFile = m_packOptions.GetPdscFullpath();
104-
if(!createModel.AddPdsc(pdscFile, m_packOptions.GetIgnoreOtherPdscFiles())) {
104+
if(!createModel.AddPdsc(pdscFile, m_packOptions.GetIgnoreOtherPdscFiles(), true)) {
105105
return false;
106106
}
107107

0 commit comments

Comments
 (0)