Skip to content

fix: validate CLI option compatibility with search type and apply file-extensions filter for content/ocr#345

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Johnson-zs:master
Jul 11, 2026
Merged

fix: validate CLI option compatibility with search type and apply file-extensions filter for content/ocr#345
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Johnson-zs:master

Conversation

@Johnson-zs

Copy link
Copy Markdown
Contributor

validate CLI option compatibility with search type and apply file-extensions filter for content/ocr

Log:

…e-extensions filter for content/ocr

validate CLI option compatibility with search type and apply file-extensions filter for content/ocr

Log:

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Johnson-zs, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码实现了CLI选项兼容性校验和文件扩展名过滤的传递,修复了原有逻辑遗漏
逻辑正确且无安全漏洞,代码质量良好,性能无损耗

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

CliOptions::parse() 函数中新增的兼容性校验逻辑正确区分了 FileName 和其他搜索类型,对不兼容选项进行了拦截;configureSearchOptions() 函数在 ContentOcr 分支中正确添加了 fileExtensions 的非空检查与设置。
潜在问题:无
建议:无

  • 2.代码质量(良好)✓

新增代码风格与原代码保持一致,错误提示信息清晰明了,直接指出了冲突的选项和适用的搜索类型,便于用户排查问题。
潜在问题:无
建议:无

  • 3.代码性能(无性能问题)✓

仅增加了轻量级的条件判断和字符串比较操作,不会对程序性能产生任何负面影响。
潜在问题:无
建议:无

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改为输入校验和参数传递逻辑,未引入任何外部输入处理风险,不存在安全漏洞。

  • 建议:无

■ 【改进建议代码示例】

// 当前代码已正确实现兼容性校验和参数传递,无需额外修复

@Johnson-zs

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit c34befa into linuxdeepin:master Jul 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants