Commitcheck

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 7, 2026

Commit message convention and DCO sign-off checker over a git history range.

已验证STDIO仅桌面开发者工具

概览

AI 生成的概览

检查 git 仓库近期提交信息,针对主题长度、占位主题、DCO 签署与约定偏离给出逐条提交的发现。

可以做什么
  • 检查 git 仓库的提交(默认最近 50 条):主题行超过 72 字符、占位主题、缺失或格式错误的 Signed-off-by 尾注,以及偏离仓库主流提交风格的情况。
  • 返回逐条提交的发现,标明规则名称与短 sha,并给出 CLEAN 或 FINDINGS 结论。
  • 规则是自适应的:只有当历史本身显示主流模式时,才会标记签署或风格问题。
适用场景
适合在推送、发布或提交贡献前,让助手审查仓库近期的提交规范,或解释历史为何不符合 DCO 或提交信息风格要求。
运行要求
以本地进程通过 stdio 运行,可用 npx 或 Docker 镜像启动。需要 Node 20 或更高版本,以及 PATH 中的 git。未声明账号、API 密钥或环境变量。
安装前请注意
仅对本地 git 历史做只读检查,未描述写入、凭据或向第三方传输数据。结果仅限最近 50 条提交,风格检测基于统计,签署检查只确认尾注存在,不验证签名真实性或签署人是否为作者。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Commitcheck,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

commitcheck

Commit hygiene checker for a git repository's recent history. It reads the most recent 50 commits and checks subject length, placeholder subjects, DCO Signed-off-by trailers, malformed trailers, and whether each commit follows the message convention the repo itself actually uses. Every finding names the rule and the short sha of the commit it came from.

Install

sh
npx @reneturcios/commitcheck check [path]

Or install it globally:

sh
npm install -g @reneturcios/commitcheck

Requires Node 20 or newer and git on PATH.

CLI

sh
commitcheck check [path] [--json]   # check a repo (default path: .)commitcheck mcp                     # run the MCP server on stdiocommitcheck --version               # print the version

Exit codes: 0 when the verdict is CLEAN, 1 when it is FINDINGS, 2 for a usage error or an unreadable target, and 141 when the reader closed the output pipe early (the shell-visible equivalent of death by SIGPIPE).

Findings are printed in git log order, newest first, and the order is deterministic for a given history.

MCP

The MCP server exposes one tool:

  • check_commits with argument path: runs the same check as the CLI and returns the full report as JSON.

Rules

RuleSeverityWhat it means
SUBJECT-TOO-LONGmediumThe subject line is over 72 characters.
SUBJECT-VAGUElowThe subject is empty or a placeholder such as wip, fix, update, changes, or .
NO-SIGNOFFmediumThe commit has no Signed-off-by trailer, in a repo whose history follows the DCO convention (see below).
CONVENTION-BREAKlowThe subject breaks the dominant message style of the range (see below).
MERGE-COMMITinfoA merge commit, reported for context. Merge commits are never a finding above info.
TRAILER-MALFORMEDlowA Signed-off-by line without an email shape, for example Signed-off-by: Jane Doe with no <[email protected]>.

The verdict is CLEAN when the range has no medium findings, and FINDINGS otherwise. Low and info findings are reported but do not change the verdict.

The adaptive rules, stated plainly

commitcheck does not impose a house style. Both convention checks are learned from the range being checked:

  • DCO / sign-off. A commit is flagged NO-SIGNOFF only when the repo demonstrably uses sign-off: at least half of the other commits in the range carry a well-formed Signed-off-by trailer. If the repo does not use sign-off, no commit is flagged for missing it. A malformed sign-off line does not count as a sign-off.
  • Message convention. Two styles are tracked: conventional subjects (type: summary or type(scope): summary) and capitalized imperative subjects (Add the thing). When one style is used by at least 70 percent of the non-merge commits in the range, it is the dominant style, and a commit that breaks it is flagged CONVENTION-BREAK. When no style reaches 70 percent, nothing is flagged for style.

Limits

  • Only the last 50 commits are checked.
  • Style detection is statistical. A short or mixed history may have no dominant style, in which case no convention findings are produced.
  • Sign-off presence is checked, not signature validity. commitcheck verifies that a Signed-off-by trailer with an email shape exists; it does not verify that the signer is the author or that any signature is genuine.
  • Merge commits are detected from the Merge ... subject line, which is the default git shape; a hand-written subject that starts with Merge will be reported as one.

来源:README.md,提交 2c8efad

工具

1

check_commits

Check the commits in a git repo (most recent 50 by default): subject lines over 72 chars, missing DCO Signed-off-by trailers, messages that break the repo's dominant convention (detected from the history itself), and placeholder subjects. Returns per-commit findings and a CLEAN or FINDINGS verdict.

输入参数path必填

版本历史

1
  1. v0.1.0最新Oct 30, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分