已合并
清理编译时grep的告警 #1495
DragonBornHD84创建于 4月9日
清理编译时grep的告警 #1495
已合并
DragonBornHD84创建于 4月9日
DragonBornHD84成员
4月9日

描述

清理编译时grep的告警

关联的Issue

关联Issue #423

测试

文档更新

类型标签

  • [.] ✨ feat: 新功能
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 DragonBornHD84 的贡献)
DDragonBornHD84成员
4月9日 创建了 pull request,commit 8ece5e47
CANN-robot
CANN-robot成员
4月9日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
scripts chenyiyuan, 诸葛洵 (2/2) 诸葛洵 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

DragonBornHD84, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
4月9日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
4月9日 将zengjuan,zhanghao_0689,yanqingshang,wulinyu,zhuliangying,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,jiangZD设为评审人
CANN-robotCANN-robot成员
4月9日 将xun_zhuge设为审查人
DragonBornHD84成员
4月9日 评论:

compile

likedislike
CANN-robot
CANN-robot成员
4月9日 评论:

问题/功能描述

本次PR包含两项Shell脚本逻辑修复。第一项修复了安装路径合法性检查函数中正则表达式转义字符使用不当的问题,原错误可能导致路径黑名单规则(如禁止连续斜杠//或连续点...)失效,影响路径验证的准确性。第二项修复了版本兼容性检查脚本中的一个变量引用错误,该错误导致在检查其他已安装软件包对当前包的依赖关系时,使用了错误的包名变量,可能使依赖检查逻辑失效。

修改方案描述

针对路径检查问题,修正了check_install_path_valid函数中的两个正则表达式模式:将黑名单模式从'\/{2,}|\.{3,}'改为'/{2,}|\.{3,}',确保能正确匹配连续斜杠;将白名单模式从'^\~?[a-zA-Z0-9./_-]*$'改为'^~?[a-zA-Z0-9./_-]*$',确保能正确匹配可选的用户主目录符号。针对版本检查问题,在_check_version_compatiable函数中,将调用get_formal_package_name函数时传递的参数从"$package"修正为"$src_pkg",以确保正确获取并转换依赖包的名称。两项修改均属于低风险的逻辑修复,旨在提升脚本功能的准确性和可靠性。

likedislike
CANN-robotCANN-robot成员
4月9日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
4月9日 评论:

流水线任务触发成功
任务链接 [0fb324fa6c9c4a94a4e1dafd7442bdc4][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
codecheck ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING
UT_Test_3 ✅ SUCCESS
UT_Test_2 ✅ SUCCESS
UT_Test_1 ✅ SUCCESS
UT_Test ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
UT_Test_report ✅ SUCCESS >>>>>

[2026-04-09 11:56:25]    CI执行结束

likedislike
DDragonBornHD84成员
4月9日 修改标题为 “清理编译时grep的告警”,原标题为“clean warning in grep”
DDragonBornHD84成员
4月9日 修改了pull request 的描述
CANN-robotCANN-robot成员
4月9日 添加了label:api-check-pass
CANN-robotCANN-robot成员
4月9日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月9日 添加了label:ci-pipeline-passed
zhugexun_sjtu
zhugexun_sjtu成员
4月9日 评论:

/lgtm

likedislike
zhugexun_sjtu
zhugexun_sjtu成员
4月9日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
4月9日 添加了label:approved
chenyiyuan成员
4月9日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
4月9日 添加了label:lgtm
CANN-robot
CANN-robot成员
4月9日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: 诸葛洵.
Reviewers who wrote a comment of /lgtm are: 诸葛洵, chenyiyuan.

likedislike
CANN-robotCANN-robot成员
4月9日 合入了pull request