已开启
update: 更新文件 .pre-commit-config.yaml #235
huangxiaojun创建于 5 天前
update: 更新文件 .pre-commit-config.yaml #235
已开启
huangxiaojun创建于 5 天前
huangxiaojun
huangxiaojun
5 天前

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

参考:openEuler社区《生成式AI工具使用与开源贡献政策》

PR功能描述 / 为什么需要这个合入**:

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #

希望检视人员了解:

likedislike
合并受阻
huangxiaojunhuangxiaojun
5 天前 创建了 pull request,commit cf17271d
atomgit-bot
atomgit-bot
5 天前 评论:

变更摘要

本次 PR 仅修改 .pre-commit-config.yamlclang-format 钩子的运行参数,将其行为由「自动格式化」改为「仅检查并强制失败」:args[-style=file, -i] 调整为 [-style=file, --dry-run, --Werror]。改动后,pre-commit 钩子不再直接改写源码文件,而是在文件格式不符合 .clang-format 配置时以错误状态终止提交,迫使开发者先自行格式化代码,从而让格式检查更可控、更显式。

主要改动

  • clang-format 改为只读检查:将 -i(原地格式化)替换为 --dry-run,钩子不再自动修改 \.(h|c|cpp)$ 文件内容,仅输出格式差异。
  • 新增 --Werror 严格模式:任何格式不符合要求的文件都会被视为错误并导致钩子失败,从而阻止未格式化的代码被提交。
  • 保留 -style=file 配置来源:仍沿用仓库根目录 .clang-format 文件中的样式定义,仅改变执行模式与失败策略。
likedislike
atomgit-bot
atomgit-bot
5 天前 评论:

代码审查

✅ 未发现问题

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 将hlinbo,shw030915,Gao_Victor,qmyyxtl,caowaterman设为审查人
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:sig/sig-UB-ServiceCore
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

Welcome To openEuler Community

Hey @huangxiaojun , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: sig-UB-ServiceCore ,
and any of the maintainers: @Gao_Victor, @caowaterman, @hlinbo, @qmyyxtl, @shw030915 ,
and any of the committers: @HJLi96, @NotCold, @areigonglei, @yutao88 .

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:openeuler-cla/no
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

CLA Signature Guide

@huangxiaojun , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
63afe0ae update: 更新文件 .pre-commit... the email used in the commit is an invalid email!
please check all commits.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:docs_ci_running
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/ubs-virt/1269/console

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 删除了label:docs_ci_running
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:docs_ci_successful
openeuler-ci-botopeneuler-ci-bot成员
5 天前 删除了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:
Check Name Build Result 详情 Build Details
check_sca SUCCESS #1269
check_code SUCCESS
check_package_license SUCCESS
x86_64 check_build SUCCESS #1262
aarch64 check_build SUCCESS #1286
pre-commit check_build SUCCESS #466
DT check_build SUCCESS #1169
check_issue_associate check_build FAILED #9481
likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:ci_failed
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:
likedislike