Skip to content

Commit

Permalink
Improve log messages for DependencyCheck, UncrustifyCheck, and SpellC…
Browse files Browse the repository at this point in the history
…heck (microsoft#115) (microsoft#215)

Improve CI log output with more actionable messages, and
downgraded some errors/warnings that should not be treated
as such.

(cherry picked from commit a4322be in release/202202)

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

Checked CI plugin results.

N/A
  • Loading branch information
makubacki authored and kenlautner committed Jun 26, 2024
1 parent 6e64615 commit 73cb6b5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .pytool/Plugin/DependencyCheck/DependencyCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environment, PLM,
for file in INFFiles:
ip = InfParser()
logging.debug("Parsing " + file)
ip.SetEdk2Path(Edk2pathObj).ParseFile(file) # MU_CHANGE
ip.SetBaseAbsPath(Edk2pathObj.WorkspacePath).SetPackagePaths(Edk2pathObj.PackagePathList).ParseFile(file)

if("MODULE_TYPE" not in ip.Dict):
tc.LogStdOut("Ignoring INF. Missing key for MODULE_TYPE {0}".format(file))
Expand All @@ -108,11 +108,9 @@ def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environment, PLM,
if mod_specific_key in pkgconfig and p in pkgconfig[mod_specific_key]:
continue

# MU_CHANGE [BEGIN] - Provide more DependencyCheck error info
logging.error(f"Dependency Check: {file} depends on pkg {p} but pkg is not listed in AcceptableDependencies")
tc.LogStdError(f"Dependency Check: {file} depends on pkg {p} but pkg is not listed in AcceptableDependencies")
overall_status += 1
# MU_CHANGE [END] - Provide more DependencyCheck error info

# If XML object exists, add results
if overall_status != 0:
Expand Down

0 comments on commit 73cb6b5

Please sign in to comment.