summaryrefslogtreecommitdiff
path: root/BaseTools/Plugin/DebugMacroCheck
AgeCommit message (Collapse)AuthorFilesLines
2025-03-13BaseTools: Fix Debug Macro Checking to Include Scanning FilesJason1 Lin1-1/+1
- In the commit 42a141800c0c26a09d2344e84a89ce4097a263ae there was a misuse of "is_dir" method. - Treating it as an object rather than function call, which caused if-condition to always as "false". - No files would be added to scanning list due to incorrect usage. - This patch corrects the issue by properly using "is_dir()". Signed-off-by: Jason1 Lin <jason1.lin@intel.com>
2025-03-06DebugMacroCheck: Do not show progress bar with zero itemsMichael Kubacki1-0/+3
In the case that the total provided to the `_show_progress()` function is zero, do not show a progress bar to prevent aborts `ZeroDivisionError` when calculating the progress percentage. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-01-07BaseTools: Skip directories with code extensions in the nameAlexander Gryanko1-1/+1
Currently openssl has an Open Quantum Safe provider submodule with directories like oqs-provider/oqs-template/oqsprov/oqsprov.c or oqs-provider/oqs-template/oqsprov/oqsprov/oqsprov_capabilities.c that are used as templates, but DebugMacroCheck tries to read them as a file when recursively traversing the subdirectories. Fail message: File "/usr/lib/python3.10/pathlib.py", line 1119, in open return self._accessor.open(self, mode, buffering, encoding, errors, IsADirectoryError: [Errno 21] Is a directory: '/CryptoPkg/Library /OpensslLib/openssl/oqs-provider/oqs-template/oqsprov/oqsprov.c' Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2023-10-28BaseTools: Plugin: Integration of edk2-pytoolsJoey Vagedes1-5/+5
Performs Integration instructions necessary to upgrade edk2-pytool-library to 0.19.3 and edk2-pytool-extensions to 0.25.1. This includes resolving the deprecation of builder.mws and replacing it with builder.edk2path functionality. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Message-Id: <20231027151551.1043941-3-joeyvagedes@microsoft.com> Reviewed-by: Rebecca Cran <rebecca@os.amperecomputing.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-09-19BaseTools/Plugin: Add DebugMacroCheckMichael Kubacki8-0/+2256
Adds a plugin that finds debug macro formatting issues. These errors often creep into debug prints in error conditions not frequently executed and make debug more difficult when they are encountered. The code can be as a standalone script which is useful to find problems in a large codebase that has not been checked before or as a build plugin that notifies a developer of an error right away. The script was already used to find numerous issues in edk2 in the past so there's not many code fixes in this change. More details are available in the readme file: .pytool\Plugin\DebugMacroCheck\Readme.md Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>