已合并
support pre commit function flow #2042
张旭创建于 4月2日
support pre commit function flow #2042
已合并
张旭创建于 4月2日
张旭成员
4月2日

描述

support pre commit function flow.
添加 pre-commit 钩子,支持 OAT(Open Audit Tool)合规检查流程。

  • 新增 pre-commit 配置,集成 OAT 合规检查
  • OAT 脚本自动检测并安装 Java 21、Maven
  • 增量扫描 staged 文件的许可证头和二进制文件
  • CRLF 行尾自动修复
  • 自动将 oat_reports/ 和 log/ 加入 .gitignore

关联的Issue

#1159

测试

pre commit oat check等功能本地执行成功。

文档更新

NA

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 张旭 的贡献)
张旭成员
4月2日 创建了 pull request,commit 3a8707fc
张旭成员
4月2日 关联了issue:[Requirement|需求建议]: 工程需要增加本地pre-commit的能力
CANN-robot
CANN-robot成员
4月2日 评论:

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
repo-cann/ops-math wangrui_, songkai111 (2/2) wangrui_, songkai111 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
4月2日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
4月2日 将zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,songkai111,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
4月2日 将zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,songkai111,llimwang,gubaocheng设为审查人
CANN-robot
CANN-robot成员
4月2日 评论:

🔵 source code change are detected, tasks labels is removed in this pull request!

likedislike
张旭成员
4月2日 评论:

compile

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

流水线任务触发成功
任务链接 [8feb213f0a7b4d03b3cc08137580df21][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>>
harmony-infer ✅ SUCCESS
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_ARM_monitor ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
Smoke_A900_npupool ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
ATK_Test_A2 ✅ SUCCESS

[2026-04-02 15:53:18]    CI执行结束

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

流水线任务触发成功
任务链接 [27d00d3c4db74e9f895e2539c8fa76d4][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ❌ FAILED
Check_Pr ✅ SUCCESS >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
cocheck_codestyle ✅ SUCCESS
likedislike
CANN-robotCANN-robot成员
4月2日 添加了label:api-check-pass
CANN-robotCANN-robot成员
4月2日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月2日 添加了label:ci-pipeline-failed
CANN-robotCANN-robot成员
4月2日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
4月2日 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月2日 删除了label:api-check-pass
CANN-robot
CANN-robot成员
4月2日 评论:

流水线任务触发成功
任务链接 [56b35ba0a3af4385addbb634cf5b4bde][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
cocheck_codestyle ✅ SUCCESS

[2026-04-02 16:08:21]    CI执行结束

likedislike
CANN-robotCANN-robot成员
4月2日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月2日 添加了label:ci-pipeline-passed
songkai111成员
4月3日 评论:

/lgtm
/approve

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

/lgtm
/approve

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

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: wangrui_, songkai111.
Reviewers who wrote a comment of /lgtm are: wangrui_, songkai111.

likedislike
CANN-robotCANN-robot成员
4月3日 关闭了关联的issue
CANN-robotCANN-robot成员
4月3日 合入了pull request