Skip to content

feat(subject): list allowed scopes in unknown-scope error#99

Merged
benner merged 3 commits into
mainfrom
feat/improve-error-messages
May 5, 2026
Merged

feat(subject): list allowed scopes in unknown-scope error#99
benner merged 3 commits into
mainfrom
feat/improve-error-messages

Conversation

@benner
Copy link
Copy Markdown
Owner

@benner benner commented May 5, 2026

Same threshold as types — list inline when configured set is at most
len(TYPES), else point at configuration. Reuses _format_allowed_hint.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Coverage

Coverage Report (Δ +0.0%)
FileStmtsMissCoverMissing
src/git_commit_guard
   __init__.py4930100% 
TOTAL4930100% 

@benner benner force-pushed the feat/improve-error-messages branch from 788f9b2 to c8dbab2 Compare May 5, 2026 20:04
benner added 3 commits May 5, 2026 23:05
Most users hitting this don't know about -s.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Append the allowed list inline when the configured set is at most
len(TYPES) (= 11, the default count) so users don't have to re-read
docs to see what's valid; fall back to "see configured types" when
the list is bigger than the default.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Same threshold as types — list inline when configured set is at most
len(TYPES), else point at configuration. Reuses _format_allowed_hint.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
@benner benner force-pushed the feat/improve-error-messages branch from c8dbab2 to 0db7f9d Compare May 5, 2026 20:05
@benner benner marked this pull request as ready for review May 5, 2026 20:06
@benner benner merged commit 3bbe8ee into main May 5, 2026
7 checks passed
@benner benner deleted the feat/improve-error-messages branch May 5, 2026 20:07
benner added a commit that referenced this pull request May 6, 2026
The imperative line was hand-written (`want imperative verb` was
never produced) and PR #99's signed-off hint never propagated.
Real messages overflow 64ch, hence the widening.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
benner added a commit that referenced this pull request May 6, 2026
PR #99 added the hint to the live tool, but README's sample output
was left at the pre-#99 line. Same drift as the site hero.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant