Skip to content

fix: update test synonyms for Chinese file types#369

Merged
deepin-bot[bot] merged 2 commits into
linuxdeepin:masterfrom
Johnson-zs:master
Jul 24, 2026
Merged

fix: update test synonyms for Chinese file types#369
deepin-bot[bot] merged 2 commits into
linuxdeepin:masterfrom
Johnson-zs:master

Conversation

@Johnson-zs

Copy link
Copy Markdown
Contributor
  1. Removed English file extensions (zip/rar/psd/fig/sketch) from Chinese
    NLP test cases
  2. Aligned code indentation in JSON parsing section

The changes were made to:

  1. Focus the test cases strictly on Chinese terms, removing English file
    extensions that shouldn't be part of the Chinese synonym testing
  2. Improve code readability by fixing inconsistent indentation in the
    JSON parsing logic

Influence:

  1. Verify Chinese NLP processing still works for all specified Chinese
    terms
  2. Check that file type recognition works as expected without the
    English terms
  3. Ensure the indentation changes don't affect the JSON parsing
    functionality

fix: 更新中文文件类型的测试同义词

  1. 从中文NLP测试用例中移除了英文文件扩展名(zip/rar/psd/fig/sketch)
  2. 对齐了JSON解析部分的代码缩进

变更原因:

  1. 测试用例应专注于中文术语,移除不属于中文同义词测试的英文文件扩展名
  2. 通过修复JSON解析逻辑中不一致的缩进来提高代码可读性

影响范围:

  1. 验证中文NLP处理对指定中文术语是否仍有效
  2. 检查在没有英文术语的情况下文件类型识别是否正常工作
  3. 确保缩进更改不会影响JSON解析功能

1. Removed English file extensions (zip/rar/psd/fig/sketch) from Chinese
NLP test cases
2. Aligned code indentation in JSON parsing section

The changes were made to:
1. Focus the test cases strictly on Chinese terms, removing English file
extensions that shouldn't be part of the Chinese synonym testing
2. Improve code readability by fixing inconsistent indentation in the
JSON parsing logic

Influence:
1. Verify Chinese NLP processing still works for all specified Chinese
terms
2. Check that file type recognition works as expected without the
English terms
3. Ensure the indentation changes don't affect the JSON parsing
functionality

fix: 更新中文文件类型的测试同义词

1. 从中文NLP测试用例中移除了英文文件扩展名(zip/rar/psd/fig/sketch)
2. 对齐了JSON解析部分的代码缩进

变更原因:
1. 测试用例应专注于中文术语,移除不属于中文同义词测试的英文文件扩展名
2. 通过修复JSON解析逻辑中不一致的缩进来提高代码可读性

影响范围:
1. 验证中文NLP处理对指定中文术语是否仍有效
2. 检查在没有英文术语的情况下文件类型识别是否正常工作
3. 确保缩进更改不会影响JSON解析功能

@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

@github-actions

Copy link
Copy Markdown

TAG Bot

TAG: 1.4.2
EXISTED: no
DISTRIBUTION: unstable

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码精简了中文NLP测试用例的输入参数并优化了代码缩进,逻辑清晰且符合测试聚焦原则。
修改无安全风险且代码质量优秀,各项维度均无问题,故给予满分。

■ 【详细分析】

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

代码修改仅涉及移除 QStringList 中的部分字符串字面量以及调整链式调用的缩进对齐,未引入任何语法错误或逻辑缺陷。
潜在问题:无
建议:无需修改

  • 2.代码质量(优秀)✓

fileType_archive_allSynonymsfileType_design_source_allSynonyms 函数中移除了英文扩展名,使测试用例更纯粹地聚焦于中文意图解析,注释也同步更新,提升了测试的准确性和可读性。loadFiletypeExtensions 中的缩进调整使代码更加规范。
潜在问题:无
建议:无需修改

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

减少测试输入项意味着减少了循环迭代的次数,对测试性能有微小的正面提升,不存在任何性能瓶颈。
潜在问题:无
建议:无需修改

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

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改仅为测试数据的精简和代码格式的调整,不涉及任何外部输入解析、文件操作或网络请求,不存在任何攻击面。

  • 建议:无需修复

■ 【改进建议代码示例】

// 当前代码已非常优秀,无需额外修复,保持现有实现即可。

@Johnson-zs

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 29f39ed into linuxdeepin:master Jul 24, 2026
19 checks passed
@deepin-bot

deepin-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

TAG Bot

Tag created successfully

📋 Tag Details
  • Tag Name: 1.4.2
  • Tag SHA: c1b4df38b510abd6b45046f632622a997f65a78c
  • Commit SHA: 29f39edeca15266721f677f1942af68ae4f76d83
  • Tag Message:
    Release util-dfm 1.4.2
    
    
  • Tagger:
    • Name: Johnson-zs
  • Distribution: unstable

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