Skip to content

Commit ce51175

Browse files
Merge branch 'main' into outbound/notReportCC_SDCMSIS-1306
2 parents acb64ed + 2d97e20 commit ce51175

File tree

28 files changed

+621
-62
lines changed

28 files changed

+621
-62
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
submodules: true
4040

4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
42+
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
4343
with:
4444
languages: cpp
4545
queries: security-and-quality
@@ -55,4 +55,4 @@ jobs:
5555
working-directory: ./build
5656

5757
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
58+
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ jobs:
7070

7171
# Upload the results to GitHub's code scanning dashboard.
7272
- name: "Upload to code-scanning"
73-
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
73+
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
7474
with:
7575
sarif_file: results.sarif

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,3 @@
2222
/build*/
2323
**/cmake-*
2424
/.cache
25-
/tools/projmgr/test
26-
/tools/projmgr/test
27-
tools/svdconv/CMakeCache.txt
28-
tools/svdconv/CMakeFiles/cmake.check_cache

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/include/ValidateSemantic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class ValidateSemantic : public Validate
4444
bool FindFileFromList(const std::string& systemHeader, const std::set<RteFile*>& targFiles);
4545
bool CheckDeviceDependencies(RteDeviceItem* device, RteProject* rteProject);
4646
bool HasExternalGenerator(RteComponentAggregate* aggregate);
47-
47+
bool FileIsHeader(const std::string& name);
48+
4849
const std::map<std::string, compiler_s>& GetCompilers() {
4950
return m_compilers;
5051
}

tools/packchk/include/ValidateSyntax.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ValidateSyntax : public Validate
8888
std::map<std::string, std::list<RteDeviceItem*> > m_allItems;
8989
std::map<std::string, std::list<RteDeviceItem*> > m_allDevices;
9090
std::string m_pdscFullpath;
91-
std::map<std::string, RteBoard*> boardsFound;
91+
std::map<std::string, RteBoard*> m_boardsFound;
9292

9393
FEATURE_TABLE m_featureTableDevice;
9494
FEATURE_TABLE m_featureTableBoard;

tools/packchk/src/CheckFiles.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ bool CheckFiles::GetFileName(RteItem* item, std::string& filename, FileType& fil
148148
filename = item->GetText();
149149
return true;
150150
}
151+
else if(tag == "description") {
152+
filename = item->GetAttribute("overview");
153+
if(filename.length()) {
154+
return true;
155+
}
156+
}
151157

152158
return false;
153159
}

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

tools/packchk/src/PackChk_Msgs.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ const MsgTable PackChk::msgTable = {
131131
{ "M315", { MsgLevel::LEVEL_ERROR, CRLF_B, "Invalid URL / Paths to Drives are not allowed in Package URL: '%URL%'" } },
132132
{ "M316", { MsgLevel::LEVEL_WARNING, CRLF_B, "URL must end with slash '/': '%URL%'" } },
133133
{ "M317", { MsgLevel::LEVEL_WARNING, CRLF_B, "Condition '%NAME%': No component found for '%NAME2%'" } },
134-
{ "M318", { MsgLevel::LEVEL_ERROR, CRLF_B, "" } },
135-
{ "M319", { MsgLevel::LEVEL_ERROR, CRLF_B, "" } },
134+
{ "M318", { MsgLevel::LEVEL_WARNING, CRLF_B, "Attribute '%TAG%' must not have '%TAG2%'" } },
135+
{ "M319", { MsgLevel::LEVEL_ERROR, CRLF_B, "'%TAG%' already defined for '%TAG2%'" } },
136136
{ "M320", { MsgLevel::LEVEL_ERROR, CRLF_B, "" } },
137137
{ "M321", { MsgLevel::LEVEL_ERROR, CRLF_B, "DS5 project requires '.project' file." } },
138138
{ "M322", { MsgLevel::LEVEL_ERROR, CRLF_B, "Associated File/Path not found: '%PATH%'" } },
@@ -152,7 +152,7 @@ const MsgTable PackChk::msgTable = {
152152
" No condition id set to specify a rule filtering for a device or set of devices." } },
153153
{ "M336", { MsgLevel::LEVEL_WARNING, CRLF_B, "Component 'Cclass=%CCLASS%, Cgroup=%CGROUP%, Cversion=%CVER%, condition=%COND%' is member of the Cclass='%CCLASS%' which shall contain device specific components.\n"\
154154
" The referenced condition id does not contain a rule filtering for a device or set of devices." } }, // No reference to a device or device not found
155-
{ "M337", { MsgLevel::LEVEL_WARNING, CRLF_B, "File with category '%CAT%' has wrong extension '%EXT%': '%PATH%'" } },
155+
{ "M337", { MsgLevel::LEVEL_WARNING, CRLF_B, "File with category '%CAT%' has wrong extension '%EXT%': '%PATH%'%MSG%" } },
156156
{ "M338", { MsgLevel::LEVEL_WARNING, CRLF_B, "No releases found!" } },
157157
{ "M339", { MsgLevel::LEVEL_WARNING, CRLF_B, "Include Path '%PATH%' must not be a file!" } },
158158
{ "M340", { MsgLevel::LEVEL_WARNING, CRLF_B, "Include Path '%PATH%' must end with '/'" } },
@@ -172,7 +172,7 @@ const MsgTable PackChk::msgTable = {
172172
{ "M354", { MsgLevel::LEVEL_WARNING3, CRLF_B, "Multiple '%FILECAT%' Files found for Component '%COMP%' for '[%VENDOR%] %MCU%' (Compiler: %COMPILER% [%OPTION%])" } },
173173
{ "M355", { MsgLevel::LEVEL_WARNING3, CRLF_B, "No '%FILECAT%' Directory found for Component '%COMP%' (%COMPID%) for '[%VENDOR%] %MCU%' (Compiler: %COMPILER% [%OPTION%])" } },
174174
{ "M356", { MsgLevel::LEVEL_ERROR, CRLF_B, "Path '%PATH%' does not specify a file!" } },
175-
{ "M357", { MsgLevel::LEVEL_WARNING, CRLF_B, "" } },
175+
{ "M357", { MsgLevel::LEVEL_WARNING, CRLF_B, "Config File '%NAME%', which gets copied to project, is also found in the include path to the original pack folder. Do not place config header files in the same directory as regular header files." } },
176176
{ "M358", { MsgLevel::LEVEL_WARNING3, CRLF_B, "Header File '%HFILE%' for '%CFILE%', used by Component '%COMP%' (%COMPID%)\n"\
177177
" for Device '[%VENDOR%] %MCU%' (Compiler: %COMPILER% [%OPTION%]) not found on file system in any include paths: %PATH%" } },
178178
{ "M359", { MsgLevel::LEVEL_WARNING, CRLF_B, "Family has no Device(s) or Subfamilies: '%FAMILY%" } },
@@ -184,7 +184,7 @@ const MsgTable PackChk::msgTable = {
184184
{ "M365", { MsgLevel::LEVEL_ERROR, CRLF_B, "Redefined %DEVTYPE% '%MCU%' found, see Line %LINE%" } },
185185
{ "M366", { MsgLevel::LEVEL_ERROR, CRLF_B, "Redefined %DEVTYPEEXIST% as %DEVTYPE% '%MCU%' found, see Line %LINE%" } },
186186
{ "M367", { MsgLevel::LEVEL_ERROR, CRLF_B, "Redefined %TYPE% '%NAME%' found, see Line %LINE%" } },
187-
{ "M368", { MsgLevel::LEVEL_ERROR, CRLF_B, "" } },
187+
{ "M368", { MsgLevel::LEVEL_ERROR, CRLF_B, "Cannot check '%NAME%'%MSG%" } },
188188
{ "M369", { MsgLevel::LEVEL_WARNING3, CRLF_B, "Feature is already defined for '%MCU%' and will be added, see Line %LINE%: '%PROP%'" } },
189189
{ "M370", { MsgLevel::LEVEL_WARNING, CRLF_B, "URL is not conformant: '%URL%':\n Backslashes are not allowed in URL, use forward slashes." } },
190190
{ "M371", { MsgLevel::LEVEL_ERROR, CRLF_B, "%SECTION% Feature for '%MCU%': '%FEATURE%' unknown." } },

0 commit comments

Comments
 (0)