fix: skip empty VBA modules during extraction to avoid creating unnecessary files
- Add check in _process_module() to detect modules with no actual code content - Display skip message for empty modules instead of creating files - Prevent empty modules from being added to metadata Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -305,6 +305,11 @@ class VBAExtractor:
|
|||||||
# 解析Attribute信息
|
# 解析Attribute信息
|
||||||
attributes, clean_code = self.parse_attributes(vba_code)
|
attributes, clean_code = self.parse_attributes(vba_code)
|
||||||
|
|
||||||
|
# 检查是否有实际代码内容(跳过空模块)
|
||||||
|
if not clean_code.strip():
|
||||||
|
print(f" [跳过] {module_name} - 无实际代码内容")
|
||||||
|
return
|
||||||
|
|
||||||
# 确定实际的模块类型
|
# 确定实际的模块类型
|
||||||
module_type = self._determine_module_type(module_name, category)
|
module_type = self._determine_module_type(module_name, category)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user