Skip to content

feat(vigutils): add --require-scope flag and strict-by-default hook config - #78

Merged
c-vigo merged 5 commits into
devfrom
feature/58-default-commit-validation
Feb 18, 2026
Merged

c-vigo merged 5 commits into
devfrom
feature/58-default-commit-validation

Conversation

@c-vigo

@c-vigo c-vigo commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add --require-scope CLI flag to validate-commit-msg to mandate that all commits include at least one scope; scopeless commits are rejected when the flag is set
  • Configure the workspace validate-commit-msg hook with explicit default args (strict-by-default) instead of commented-out examples, lowering the barrier to enforcement for new projects
  • Document all CLI flags including --require-scope in the vig-utils README

Test plan

  • --require-scope rejects commits without a scope (e.g. feat: description)
  • --require-scope accepts commits with one or more scopes (e.g. feat(api): description)
  • Existing tests still pass (uv run pytest packages/vig-utils/tests/test_validate_commit_msg.py)
  • Pre-commit hooks run cleanly against the repo (uv run pre-commit run --all-files)

Refs: #58

Allow projects to enforce that all commits include at least one scope by using the --require-scope flag. When enabled, commits without scopes (e.g., 'feat: description') are rejected; commits with one or more scopes (e.g., 'feat(api): description') are accepted.

Refs: #58
Add reference to package documentation.

Refs: #58
@c-vigo c-vigo added the feature New feature or request label Feb 18, 2026
@c-vigo c-vigo self-assigned this Feb 18, 2026
@c-vigo
c-vigo requested a review from gerchowl February 18, 2026 12:55
- Add missing `f` prefix to require-scope error message in validate_commit_msg
- Use a scoped commit message in test_git_commit_ssh_signature to satisfy
  the workspace pre-commit config's --require-scope enforcement

Refs: #58
@c-vigo
c-vigo merged commit 0fff97f into dev Feb 18, 2026
11 checks passed
@c-vigo
c-vigo deleted the feature/58-default-commit-validation branch February 18, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant