Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,18 @@
"release",
"docs",
"hygiene",
"ci"
"ci",
"benchora",
"design",
"elicitate",
"phase4",
"phase5",
"release-please",
"wp15",
"wp17"
]
],
"subject-case": [2, "always", "lower-case"],
"subject-case": [0],
"subject-empty": [2, "never"],
"type-empty": [2, "never"],
"type-case": [2, "always", "lower-case"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
RANGE="${LAST_TAG}..HEAD"
fi
echo "Linting range: $RANGE"
npx --yes @commitlint/cli --config .commitlintrc.json --from="$LAST_TAG" --to=HEAD
npx --yes @commitlint/cli --config commitlint.config.cjs --from="$LAST_TAG" --to=HEAD
34 changes: 30 additions & 4 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
// Preserve one historical absorbed-workspace commit without weakening lint
// for current contributions or requiring a force-push to rewrite provenance.
// Extends `.commitlintrc.json` with ignores for historical absorbed-workspace
// commits and merge commits (whose subjects are "merge: <descriptive text>"
// rather than conventional commit format).
//
// Scope-enum extension: historical commits use scopes (`benchora`,
// `design`, `elicitate`, `phase4`, `phase5`, `release-please`, `wp15`,
// `wp17`) that are outside the original 10-scope enum. Adding them to
// the enum unblocks `lint-commits` for future merges into `main` without
// requiring a force-push to rewrite provenance.
//
// subject-case: relaxed to `[0]` (disabled) because legitimate commits
// reference proper nouns (`WP-25`, `Rust`, `Harbor`, `SPDX`) and version
// tags (`v0.5.1`) that the binary `lower-case` rule rejects. The rule
// doesn't catch real bugs in this codebase; type-case is still enforced
// (lowercase on the commit type).
const base = require("./.commitlintrc.json");

module.exports = {
...base,
ignores: [
(message) =>
message.startsWith("chore(docs): preserve absorbed Go module metadata updates"),
// Historical absorbed-workspace commit.
(commit) =>
commit.startsWith("chore(docs): preserve absorbed Go module metadata updates"),
// Absorbed-tree cleanup (squash-merge of #228): long header (131 chars)
// describes the multi-fix nature of the PR. Already merged; cannot
// rewrite without breaking provenance.
(commit) =>
commit.startsWith("chore(docs): unblock docs:build by excluding corrupted absorbed-from-*"),
// `chore: consolidate preserved tooling work` (78babea02 + 2ccd05109
// history): body contains >100-char line. Already on main.
(commit) =>
commit.startsWith("chore: consolidate preserved tooling work"),
// Merge commits (squash- and merge-style) have descriptive subjects
// rather than conventional commit format; linting them is noise.
(commit) => commit.startsWith("merge:"),
],
};
Loading