| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
origin code Signed-off-by: yujiangtao <yujiangtao11@h-partners.com> | 6 个月前 | |
origin code Signed-off-by: yujiangtao <yujiangtao11@h-partners.com> | 6 个月前 | |
Repo-wide pre-commit: reflow all C++ under updated .clang-format and modernize pre-commit/OAT config Co-authored-by: zhywang<wangzhiyong74@huawei.com> # message auto-generated for no-merge-commit merge: !1314 merge master into master Repo-wide pre-commit: reflow all C++ under updated .clang-format and modernize pre-commit/OAT config Created-by: zhhywang Commit-by: zhywang Merged-by: cann-robot Description: Created-by: zhhywang Commit-by: zhhywang Merged-by: cann-robot Description: 以更新后的 .clang-format(核心:PointerAlignment Right→Left;另 AfterEnum true→false、AlwaysBreakBeforeMultilineStrings true→false、AlignAfterOpenBracket AlwaysBreak、AllowShortFunctionsOnASingleLine false→true)为基准,对**全仓 C++**(含 tests//include//kernels//demos/)做确定性格式化重排;并重写 .pre-commit-config.yaml(gitcode 镜像、clang-format v16→v18,新增 ruff/codespell/typos/OAT 全套 hook)、细化 OAT.xml 合规策略。**不改变任何功能逻辑**,全仓无 Python 改动。 ## 描述 本次提交为「全仓 C++ 格式化 + pre-commit 工程配置升级」,原则:**只做确定性风格重排与配置强化,零逻辑变更**。按改动分三类: 1. **全仓 C++ 格式化(主体)**:clang-format 重排 1841 个 C++ 文件(.cpp 1273 / .hpp 506 / .h 58 / .cc 4),覆盖 tests(1227)、include(455)、kernels(137)、demos(22)。改动为指针对齐 Type &x→Type& x 及按新列宽/换行规则的逐行重排;每个删除行均有等价新增行(token 不变),git diff -w 验证为纯重排。净行数略减(短函数/紧凑换行合并)。 2. **.pre-commit-config.yaml 重写**:mirror 切换至 gitcode.com;clang-format v16.0.0→v18.1.8;补齐 pre-commit-hooks(trailing-ws/eof/check-yaml/large-files/merge-conflict/private-key/json);新增 ruff-check + ruff-format、codespell、typos、本地 oat-check;设 minimum_pre_commit_version: 4.0.0、default_stages:[pre-commit];顶层 exclude 增 ^(tests|demos)/.*\.py$。 3. **OAT.xml 合规策略细化**:license policyitem 补 filefilter/desc;新增 <policyitem type="copyright" name="Huawei Technologies Co., Ltd" .../>(Copyright 噪声下降);defaultPolicyFilter 增配置/图片/二进制文件过滤(xml/yaml/csv/png/so/o/om 等)。 > 说明:本次**无任何 Python 文件改动**(0 个 .py);codespell hook --skip *.cpp/*.hpp/*.c/*.h,不检查 C++ 拼写,故全仓 diff 无标识符 rename、无拼写修复、无 # noqa。 ## 关联的Issue ## 测试 - **pre-commit 全量**:trailing-whitespace / end-of-file-fixer / check-yaml / check-added-large-files / check-merge-conflict / detect-private-key / clang-format 等 hook PASS。 - **格式化收敛**:抽样文件 -w 验证为纯重排(token 等价,无语义变化)。 - ⚠️ **未做编译验证**(本机无 CANN 工具链):格式化不改逻辑;建议在可编译环境跑一次 build 复核。 - **改动量**:1844 文件,+69754 / −80029(主体为格式化重排,净行数略减)。 ## 文档更新 无文档内容改动;.clang-format 为本仓既有 Allman 规则更新(本次格式化基准)。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:全仓 pre-commit 工程治理——按更新后的 .clang-format(PointerAlignment Right→Left 等)重排全仓 C++,并重写 .pre-commit-config.yaml/细化 OAT.xml;无 Python 改动、无逻辑变更。 See merge request: cann/pto-isa!1314 | 3 天前 | |
Repo-wide pre-commit: strip trailing whitespace and normalize EOF newlines Co-authored-by: zhywang<wangzhiyong74@huawei.com> # message auto-generated for no-merge-commit merge: !1320 merge master into master Repo-wide pre-commit: strip trailing whitespace and normalize EOF newlines Created-by: zhhywang Commit-by: zhywang Merged-by: cann-robot Description: Created-by: zhhywang Commit-by: zhhywang Merged-by: cann-robot Description: 全仓跑 trailing-whitespace + end-of-file-fixer:剥离行尾空白、补缺失末行换行、删多余尾随空行;零逻辑/语义变更,覆盖 tests/docs/include/kernels/demos 及 .py/.md/.sh/.js。 ## 描述 全仓 pre-commit 自动修复扫描,**仅做空白与行尾归一,零逻辑变更**: - **行尾空白**:剥离行末多余空格/制表符(主体;.cpp/.hpp/.h/.md/.py/.sh/.js 全覆盖)。 - **文件尾换行**:补缺失末行换行(多处 \ No newline at end of file)、删多余尾随空行,统一单换行结尾。 git diff -w 仅余 250 文件(皆为 EOF 换行/空行修复,-w 不抑制空行变更),其余 ~903 文件纯行尾空白;逐类抽样(.cpp/.hpp/.py/.md/setup.py/SKILL.md)均为空白归一,无 token 变化。 ## 关联的Issue ## 测试 - **空白归一收敛**:git diff -w --stat = 250 文件 +46/−365;抽样 .cpp 文件 -w diff 为空(纯行尾空白)。 - **无逻辑变更**:无标识符 rename、无代码增删,仅空白/换行。 - ⚠️ 未做编译验证(本机无 CANN/CPU-sim 工具链);空白不改语义,建议可编译环境跑一次 build 复核。 - **改动量**:1153 文件,+15054 / −15373(.cpp 634 / .md 298 / .hpp 175 / .py 18 / .sh 13 / .h 12 / .js 3)。 ## 文档更新 无文档内容改动;.md 仅为行尾空白/EOF 换行归一。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:全仓 pre-commit 空白归一——trailing-whitespace + end-of-file-fixer,清理行尾空白、统一末行换行;零逻辑变更。 See merge request: cann/pto-isa!1320 | 3 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 6 个月前 | ||
| 3 天前 | ||
| 3 天前 |