Skip to content

Commit 8484021

Browse files
authored
docs: say it plainly where the prose was performing (#40)
1 parent a448317 commit 8484021

10 files changed

Lines changed: 42 additions & 39 deletions

File tree

‎docs/configuration.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ in more than one, the first one listed wins:
88
3. **A configuration file** — `cchk.toml` or `commit-check.toml`
99
4. **Built-in defaults**
1010

11-
That ordering is what makes the layering useful: the file carries the policy
12-
the project agreed on, the environment overrides it for a single CI job, and a
11+
The file carries the policy the project agreed on, the environment overrides it for a single CI job, and a
1312
flag overrides both for a single run.
1413

1514
!!! tip "Defaults are not "nothing""
@@ -169,7 +168,7 @@ the shared one, as any inherited key does.
169168
## A worked example
170169

171170
Every line below that differs from the built-in default is marked, so it is
172-
clear what this file is actually changing:
171+
clear what this file changes:
173172

174173
```toml title="cchk.toml"
175174
# changed: report the branch rule without enforcing it (nothing is warned by default)

‎docs/getting-started.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $ git commit --amend -m "fix(parser): handle empty input"
8181
$ commit-check --message
8282
```
8383

84-
No output and an exit code of `0`. Commit Check is quiet when it is happy.
84+
It prints nothing and exits with code `0`.
8585

8686
## 4. Check the branch too
8787

@@ -172,8 +172,9 @@ belongs:
172172

173173
## Verifying the download
174174

175-
Releases are built with [SLSA Level 3](https://slsa.dev) provenance. To verify a
176-
release artifact came from this repository's build pipeline:
175+
Every release is published with a signed
176+
[build provenance attestation](https://docs.github.com/en/actions/concepts/security/artifact-attestations). To verify
177+
a release artifact came from this repository's build pipeline:
177178

178179
```console
179180
$ gh attestation verify commit_check-*.whl --repo commit-check/commit-check

‎docs/guides/github-actions.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GitHub Action
22

3-
Local hooks can be skipped. A CI check cannot, which makes GitHub Actions the
4-
place where your policy is actually a policy.
3+
Local hooks can be skipped. A CI check cannot, so the Action is where the
4+
policy is enforced.
55

66
```yaml title=".github/workflows/commit-check.yml"
77
name: Commit Check

‎docs/guides/github-app.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ inheritance [fails open](organization.md#other-sources).
108108
A repository with no config file first looks to its account: a `cchk.toml` in
109109
the owner's `.github` repository — organizations and personal accounts both
110110
have one — is applied as if it were the repository's own, and the report says
111-
so in its last lines. That is enforcement, not advice — the owner chose the
111+
so in its last lines. Its failures are enforced, because the owner chose those
112112
rules.
113113

114114
A repository with no config file **and** no shared one has not chosen its
@@ -125,7 +125,8 @@ conventional_commits = true
125125
conventional_branch = true # false if branch names are free-form
126126
```
127127

128-
Add it, push, and failures are failures. A pass is a pass either way.
128+
Once the file is pushed, a failure turns the check red instead of neutral. A
129+
passing result is the same with or without it.
129130

130131
!!! warning "Required means nothing until there is a config"
131132

@@ -156,8 +157,8 @@ in the branch's ruleset or branch protection, where the repository's plan
156157
allows one. With that in place a failing result blocks the merge button and a
157158
passing one clears it.
158159

159-
The order matters: config file first, then the required check, for the reason
160-
in the box above.
160+
Add the config file first and the required check second, for the reason in
161+
the box above.
161162

162163
## Across an organization
163164

‎docs/guides/integrations.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Where to run it
22

33
Commit Check is one rule engine with several places to run it, and every one
4-
of them reads the same `cchk.toml`. That is the point: the rules cannot drift
5-
between what a developer sees locally and what is enforced on the pull request.
4+
of them reads the same `cchk.toml`, so the rules cannot drift between what a
5+
developer sees locally and what is enforced on the pull request.
66

77
| Where | Catches problems | Can be bypassed | Set up |
88
|---|---|---|---|

‎docs/guides/organization.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ red. A gentler sequence:
114114
[`dry-run`](github-actions.md#reporting-without-failing) does the same
115115
for every rule at once, in the Action only.)
116116
2. Look at what actually fails. Some rules will turn out to be wrong for some
117-
teams — that is information, not an obstacle.
117+
teams, and those teams can override them in their own config.
118118
3. Drop a rule from `warn` once the repositories are clean. A repository that
119119
is already clean can drop it early with a `warn` list of its own, which
120120
replaces the shared one.

‎docs/guides/policies.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ require every commit to carry a `Signed-off-by` trailer. The Linux kernel and
1414
much of the CNCF work this way.
1515

1616
A DCO bot rejecting a pull request after the fact is a poor experience: the
17-
contributor has to rewrite history for every commit in the branch. Checking
18-
locally fixes it before it becomes a problem.
17+
contributor has to rewrite history for every commit in the branch. A local check
18+
catches a missing sign-off at commit time, before there is anything to rewrite.
1919

2020
### Turn it on
2121

@@ -157,7 +157,7 @@ Most projects that allow AI assistance ask to be told about it. The
157157
[Fedora](https://docs.fedoraproject.org/en-US/council/policy/ai-policy/) and
158158
FluxCD want an `Assisted-by:` trailer; the
159159
[Apache Software Foundation](https://www.apache.org/legal/generative-tooling.html)
160-
recommends `Generated-by:`. The kernel adds a second rule: an AI agent must
160+
recommends `Generated-by:`. The kernel also says an AI agent must
161161
never add a `Signed-off-by:` line, because only a person can certify the
162162
[DCO](https://developercertificate.org/).
163163

@@ -234,8 +234,8 @@ The Assisted-by value does not match the required pattern: ^\S+/\S+$
234234
Suggest: Write the Assisted-by value so that it matches ^\S+/\S+$ (set by ai_disclosure_pattern in the [commit] config)
235235
```
236236

237-
There is no correction for that one: which model, in which format, is not
238-
something the tool should guess.
237+
That failure carries no correction, because the tool should not guess which
238+
model or format you meant.
239239

240240
### Disclosure that is appreciated, not required
241241

‎docs/index.md‎

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ Suggest: Use "fix: add streaming support"
3131
Docs: https://commit-check.com/rules/#cc001
3232
```
3333

34-
It does not just say no. When the correction is unambiguous, it hands you
35-
the line.
34+
When the correction is unambiguous, it hands you the line.
3635

3736
</div>
3837
</div>
@@ -214,10 +213,11 @@ $ pip install commit-check
214213
$ commit-check --message --branch
215214
```
216215

217-
No configuration file needed to start — sensible defaults apply immediately, and
218-
you tighten them when you are ready. Releases carry
219-
[SLSA Level 3](https://slsa.dev) build provenance, so you can verify an artifact
220-
came from this repository's pipeline before you install it.
216+
No configuration file needed to start: the defaults check Conventional Commits,
217+
Conventional Branch and subject length, and you tighten them when you are ready. Every release
218+
carries a signed [build provenance attestation](https://docs.github.com/en/actions/concepts/security/artifact-attestations),
219+
so you can verify an artifact came from this repository's pipeline before you
220+
install it.
221221

222222
## Pick where it runs
223223

@@ -239,7 +239,7 @@ One policy engine, five places to enforce it. Every one of them reads the same
239239

240240
---
241241

242-
The fastest feedback there is: the commit is rejected before it exists.
242+
It rejects a bad commit before Git records it.
243243
Opt-in by nature, so pair it with one of the enforced surfaces.
244244

245245
[:octicons-arrow-right-24: Guide](guides/pre-commit.md)
@@ -313,9 +313,9 @@ GitHub can enforce some of the same policies natively, but the commit-metadata
313313
rules sit behind its Enterprise plan. For a twenty-person team that is the
314314
difference between $4 and $21 a seat — about $340 a month for a regular
315315
expression, which reports a bare mismatch where Commit Check reports a rule ID,
316-
a suggestion and a link. Nineteen dollars is what the same twenty people cost
317-
here — and the same twenty thousand.
318-
[The arithmetic and the honest caveats](compare/github-rules.md).
316+
a suggestion and a link. The Team plan here is $19 a month whatever the team
317+
size.
318+
[The arithmetic, and the caveats](compare/github-rules.md).
319319

320320
## Questions
321321

@@ -328,9 +328,8 @@ here — and the same twenty thousand.
328328

329329
??? question "Can a developer bypass it?"
330330

331-
The pre-commit hook, yes — `git commit --no-verify` is one flag, and that
332-
is by design: a local hook is fast feedback, not a gate. The enforcement
333-
boundary is CI. Make the Action or the App a required status check and a
331+
The pre-commit hook, yes: `git commit --no-verify` is one flag, and a local
332+
hook is there for fast feedback. The enforcement boundary is CI. Make the Action or the App a required status check and a
334333
violating change cannot merge, however it was committed.
335334

336335
??? question "Will turning it on block everyone tomorrow?"
@@ -361,9 +360,12 @@ here — and the same twenty thousand.
361360

362361
??? question "How do I know the package I installed is the one you built?"
363362

364-
Releases carry [SLSA Level 3](https://slsa.dev) build provenance. The
365-
GitHub Action verifies the attestation with `gh attestation verify` before
366-
it installs anything, and fails the step if verification does not pass.
363+
Every release carries a signed
364+
[build provenance attestation](https://docs.github.com/en/actions/concepts/security/artifact-attestations)
365+
naming the workflow in this repository that built it. Check a wheel
366+
yourself with `gh attestation verify <file> --repo commit-check/commit-check`;
367+
the GitHub Action runs the same check before it installs anything, and
368+
fails the step if verification does not pass.
367369

368370
??? question "Who is behind this?"
369371

‎docs/migration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ message and suggestion. You wrote the pattern; Commit Check ran it. In v2 the
99
patterns are built in and the file selects and tunes them by name. A v1 file
1010
was mostly regex; a v2 file is mostly booleans.
1111

12-
The practical consequence: you do not translate a v1 file line by line. You
12+
So you do not translate a v1 file line by line. You
1313
decide which rules you want and write those down, which is usually far shorter.
1414

1515
## Converting the file

‎docs/rules.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ Rejects commits with an empty message.
400400

401401
**Why is this bad?**
402402

403-
A commit with no subject cannot be searched for, summarised, or reviewed. It is
404-
a gap in the history that nobody can fill in later.
403+
A commit with no subject cannot be searched for, summarised, or reviewed, and
404+
once it is pushed, adding a message means rewriting history.
405405

406406
**Options**
407407

0 commit comments

Comments
 (0)