| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: openUBMC pre-commit 钩子集合 提供 openUBMC 项目所需的 pre-commit 钩子。本仓库 manifest 不依赖任何外部 仓库,hooks/ 下也不堆砌脚本。 hooks/ 下三个 openUBMC 专属钩子(language: script,纯标准库,离线运行, 已加 Mulan PSL v2 协议头并标记可执行): - conventional-commit:校验 commit message 符合 Conventional Commits - add-signoff-and-change-id:在 commit message 末尾追加 Signed-off-by 和 Change-Id - check-sr:校验 .sr 文件语法(支持 C 风格注释) manifest 中通过 language: python + additional_dependencies 或 inline python -c 提供的钩子(无脚本文件): - check-json / check-yaml:JSON / YAML 语法检查 - black(auto-fix,line-length=120,字符串双引号) - isort(auto-fix,profile=black) - no-space-before-colon:autopep8 --select E203 自动修复切片冒号前空格, 化解 black 与 E203/G.FMT.04 的冲突(采纳 reviewer masiyu 建议) - flake8:仅忽略 W503(E203 由 no-space-before-colon 处理) - clang-format:C/C++ 格式化,clang-format 22.1.5,-style=file 示例 .pre-commit-config.yaml 另引用官方 pre-commit-hooks 国内镜像 (gitcode.com/gh_mirrors/pr/pre-commit-hooks)补齐 5 个需要独立脚本 实现的通用检查:trailing-whitespace / end-of-file-fixer / check-merge-conflict / check-added-large-files(--maxkb 1024)/ check-case-conflict,并补 detect-private-key;trailing-whitespace / end-of-file-fixer / check-json 排除 .vscode/。 其它: - clang-format 在示例配置中默认注释(-style=file 缺 .clang-format 时会 按 --fallback-style=LLVM 静默改写 C/C++ 文件,opt-in 更安全) - README:特性 / 钩子表 / 快速开始 / autoupdate 流程 / 推荐的官方 hooks - pyproject.toml + .flake8:black/isort/flake8 本地配置 - .gitattributes:强制文本文件 LF 存储 - tests/check_sr_test.py:check-sr 单元测试(24 passed) | 3 个月前 | |
feat: 支持全局属性校验 Co-Authored-By: DeepSeek-V4-Pro | 1 个月前 | |
feat: openUBMC pre-commit 钩子集合 提供 openUBMC 项目所需的 pre-commit 钩子。本仓库 manifest 不依赖任何外部 仓库,hooks/ 下也不堆砌脚本。 hooks/ 下三个 openUBMC 专属钩子(language: script,纯标准库,离线运行, 已加 Mulan PSL v2 协议头并标记可执行): - conventional-commit:校验 commit message 符合 Conventional Commits - add-signoff-and-change-id:在 commit message 末尾追加 Signed-off-by 和 Change-Id - check-sr:校验 .sr 文件语法(支持 C 风格注释) manifest 中通过 language: python + additional_dependencies 或 inline python -c 提供的钩子(无脚本文件): - check-json / check-yaml:JSON / YAML 语法检查 - black(auto-fix,line-length=120,字符串双引号) - isort(auto-fix,profile=black) - no-space-before-colon:autopep8 --select E203 自动修复切片冒号前空格, 化解 black 与 E203/G.FMT.04 的冲突(采纳 reviewer masiyu 建议) - flake8:仅忽略 W503(E203 由 no-space-before-colon 处理) - clang-format:C/C++ 格式化,clang-format 22.1.5,-style=file 示例 .pre-commit-config.yaml 另引用官方 pre-commit-hooks 国内镜像 (gitcode.com/gh_mirrors/pr/pre-commit-hooks)补齐 5 个需要独立脚本 实现的通用检查:trailing-whitespace / end-of-file-fixer / check-merge-conflict / check-added-large-files(--maxkb 1024)/ check-case-conflict,并补 detect-private-key;trailing-whitespace / end-of-file-fixer / check-json 排除 .vscode/。 其它: - clang-format 在示例配置中默认注释(-style=file 缺 .clang-format 时会 按 --fallback-style=LLVM 静默改写 C/C++ 文件,opt-in 更安全) - README:特性 / 钩子表 / 快速开始 / autoupdate 流程 / 推荐的官方 hooks - pyproject.toml + .flake8:black/isort/flake8 本地配置 - .gitattributes:强制文本文件 LF 存储 - tests/check_sr_test.py:check-sr 单元测试(24 passed) | 3 个月前 | |
feat: openUBMC pre-commit 钩子集合 提供 openUBMC 项目所需的 pre-commit 钩子。本仓库 manifest 不依赖任何外部 仓库,hooks/ 下也不堆砌脚本。 hooks/ 下三个 openUBMC 专属钩子(language: script,纯标准库,离线运行, 已加 Mulan PSL v2 协议头并标记可执行): - conventional-commit:校验 commit message 符合 Conventional Commits - add-signoff-and-change-id:在 commit message 末尾追加 Signed-off-by 和 Change-Id - check-sr:校验 .sr 文件语法(支持 C 风格注释) manifest 中通过 language: python + additional_dependencies 或 inline python -c 提供的钩子(无脚本文件): - check-json / check-yaml:JSON / YAML 语法检查 - black(auto-fix,line-length=120,字符串双引号) - isort(auto-fix,profile=black) - no-space-before-colon:autopep8 --select E203 自动修复切片冒号前空格, 化解 black 与 E203/G.FMT.04 的冲突(采纳 reviewer masiyu 建议) - flake8:仅忽略 W503(E203 由 no-space-before-colon 处理) - clang-format:C/C++ 格式化,clang-format 22.1.5,-style=file 示例 .pre-commit-config.yaml 另引用官方 pre-commit-hooks 国内镜像 (gitcode.com/gh_mirrors/pr/pre-commit-hooks)补齐 5 个需要独立脚本 实现的通用检查:trailing-whitespace / end-of-file-fixer / check-merge-conflict / check-added-large-files(--maxkb 1024)/ check-case-conflict,并补 detect-private-key;trailing-whitespace / end-of-file-fixer / check-json 排除 .vscode/。 其它: - clang-format 在示例配置中默认注释(-style=file 缺 .clang-format 时会 按 --fallback-style=LLVM 静默改写 C/C++ 文件,opt-in 更安全) - README:特性 / 钩子表 / 快速开始 / autoupdate 流程 / 推荐的官方 hooks - pyproject.toml + .flake8:black/isort/flake8 本地配置 - .gitattributes:强制文本文件 LF 存储 - tests/check_sr_test.py:check-sr 单元测试(24 passed) | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 3 个月前 |