过滤机制详解
CodeWeaver通过-ignore
参数接受正则表达式模式,支持:
• 多规则并列(逗号分隔)
• 部分匹配(无需完整路径)
• 扩展名级过滤
Example of operation
- 基础排除::
-ignore=.git,node_modules
跳过版本控制和依赖目录 - 文件类型过滤::
-ignore=.log$,.tmp$
排除所有日志和临时文件 - 路径模式::
-ignore=/build/,/test/
跳过特定路径段
Advanced Configuration Tips
- 白名单模式:先全部排除再包含指定类型
-ignore=.* --included-paths-file=whitelist.txt
- 调试验证: Cooperation
-excluded-paths-file
检查过滤结果 - 正则优化::
- expense or outlay
.*/venv/.*
匹配任意层级的虚拟环境 ^dist/
仅排除根目录下的dist文件夹
- expense or outlay
caveat
- 模式匹配区分大小写
- 转义特殊字符(如
.
匹配点号) - 建议先在小范围目录测试规则
This answer comes from the articleCodeWeaver: Automatically generate Markdown documents from code structure and content.The