slop/non-conventional-commits
Commit subjects in the history follow Conventional Commits
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.5.0 |
| Selected by | fleetlint-slop@v0.5.0 |
Requirement
Commit subjects in the recent history (params.commits, default 200) have the form type(scope): subject. Merge commits, git’s own Revert "..." subjects and the root commit are exempt. hooks/conventional-commits checks that a hook prevents new ones; this rule reads what is already committed.
Why
The changelog and the next version number are computed from the subjects.
Applies when
repo.has_gitCheck
For each item in:
commits(params.commits)item.subject.matches(r'^(feat|fix|refactor|perf|test|docs|build|chore|revert|ci|style)(\([^)]+\))?!?: ') || item.subject.startsWith("Merge ") || item.subject.startsWith("Revert \"") || item.rootParameters
commits:200
Fix
Install the commit-msg hook so new commits are checked.
Agent instruction: Use Conventional Commits for new commits. Do not rewrite pushed history without the user’s decision.
Sources
- https://www.conventionalcommits.org/en/v1.0.0/ (standard, Specification)
- https://fleetlint.org/baseline/#slop
- https://fleetlint.org/slop/#commits-and-history
Generated by fleetlint docs from catalog v0.5.0.