Skip to content

commits

Commit messages: a conventional type, an optional scope, a first line of 72 characters or fewer, and a wrapped body.

Always.

Checks a new commit message for a conventional type, an optional known scope, a first line of 72 characters or fewer, and a wrapped body.

Runs at the message stage, only at the all level.

Release notes, blame, and bisect depend on typed, scoped subjects, and a free-form message hides the change.

Write <type>: <subject> or <type>(<scope>): <subject> in a first line of 72 characters or fewer, with ! before the colon for a breaking change. Leave a blank line after the first line, and keep each line of the body within the same length. Change the accepted types with gspot set commits.types.

The message changed stuff has no type or scope. Write fix(cli): report missing configuration instead.

gspot ignore commits/commitlint --paths "<path>" --reason "<why>"
gspot ignore commits/commitlint --rule <rule> --reason "<why>"

Checks a new commit message for AI session links, finding IDs, plan steps, home folder paths, markers that stop CI, and Refs: or Closes: footers with no issue number.

Runs at the message stage.

A reader of the history cannot open a chat session, a private finding, or a plan step, and a session link shares the chat with everyone who can read the repository.

Remove the line that the finding names.

The trailer Claude-Session: https://claude.ai/code/session_01Abc reports session-link. Remove the line, and describe the change in the message itself.

Rule What it checks What to do
session-link No line of the commit message links to an AI chat session. Remove the link, and describe the change in the message itself.
finding-id No line names a finding ID, such as AB12-SEC-3. Replace the ID with a description of the change.
plan-step No line names a step of a plan, such as step 2.1. Replace the step with a description of the change.
home-path No line names a path inside a home folder, such as /home/<name>/. Write the path from the repository root.
issue-footer A Refs: or Closes: footer names an issue number. Add the issue number, such as Closes: #42, or delete the footer.
ci-skip No line holds a marker that stops CI, such as [skip ci]. Delete the marker, so that CI runs on the commit.
gspot ignore commits/references --paths "<path>" --reason "<why>"
gspot ignore commits/references --rule session-link --reason "<why>"

Checks the message of each commit in a push. A manual run covers every commit from the upstream merge base to HEAD.

Runs at the push stage, only at the all level.

A message written past the hook (--no-verify, a rebase, or a merge) still reaches the shared branch unless the push checks it.

Reword the commits that fail with git rebase -i, or change the rule with gspot set tools.commitlint.rules. To accept a finding, this check needs its own [[ignore]] record, because one for commits/commitlint does not cover it.

A commit with the message changed stuff in the push fails. Reword it as fix(cli): report missing configuration, and coordinate first when others share that history.

gspot ignore commits/commitlint-pushed --paths "<path>" --reason "<why>"
gspot ignore commits/commitlint-pushed --rule <rule> --reason "<why>"
Setting What it sets
commits.types The commit types the type-enum rule allows.
commits.scopes The commit scopes that a message may use. A message may also leave out its scope. When empty, gspot allows the last folder name of each [[scope]] path, or any commit scope when gspot.toml has no [[scope]].
tools.commitlint.rules Options for active commitlint rules, by rule name: an always/never condition and an optional value, without a severity; the level decides which rules run. Ignore a finding with gspot ignore commits/commitlint --rule <rule> --reason "<why>".
Rule file Installed when
.gspot/rules/GIT.md Always
Tool Version
commitlint 21.2.3

.gspot/configurations/commits/commitlint.json