Skip to content

Commit bab16cb

Browse files
feat(standards): add language and workflow scopes for all ecosystems (#2)
Add ruby, go, javascript, rust language scopes and security, changelog, release workflow scopes to VALID_SCOPES. Updates tests, README, and DEVELOPMENT.md to match. Resolves scope validation gap where DEVELOPMENT.md documented scopes that config.py did not implement. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d2808a2 commit bab16cb

File tree

6 files changed

+92
-3
lines changed

6 files changed

+92
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Changed
10+
## [1.1.0] - 2026-03-08
1111

12-
- Updated beta banner to v1 stable
12+
### Added
13+
14+
- Language scopes: ruby, go, javascript, rust
15+
- Workflow scopes: security, changelog, release
16+
- Explicit test cases for all new scopes
17+
18+
### Fixed
19+
20+
- Scope validation now matches all scopes documented in DEVELOPMENT.md
1321

1422
## [1.0.0] - 2026-02-20
1523

DEVELOPMENT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,14 @@ type(scope): description
6161
| `ruby` | Ruby tooling, configs, or standards |
6262
| `go` | Go tooling, configs, or standards |
6363
| `javascript` | JavaScript/TypeScript tooling, configs, or standards |
64+
| `rust` | Rust tooling, configs, or standards |
6465
| `container` | Dev-toolchain container image |
6566
| `ci` | CI/CD pipeline configuration |
6667
| `makefile` | Makefile targets and patterns |
6768
| `standards` | DevRail standards documentation |
69+
| `security` | Security tooling and configuration |
70+
| `changelog` | Changelog and release notes |
71+
| `release` | Release process and tagging |
6872

6973
<!-- /devrail:commits -->
7074

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A [pre-commit](https://pre-commit.com/) hook that enforces [Conventional Commits
1414
```yaml
1515
repos:
1616
- repo: https://github.com/devrail-dev/pre-commit-conventional-commits
17-
rev: v1.0.0
17+
rev: v1.1.0
1818
hooks:
1919
- id: conventional-commits
2020
```
@@ -59,10 +59,17 @@ type(scope): description
5959
| `terraform` | Terraform tooling, configs, or standards |
6060
| `bash` | Bash tooling, configs, or standards |
6161
| `ansible` | Ansible tooling, configs, or standards |
62+
| `ruby` | Ruby tooling, configs, or standards |
63+
| `go` | Go tooling, configs, or standards |
64+
| `javascript` | JavaScript/TypeScript tooling, configs, or standards |
65+
| `rust` | Rust tooling, configs, or standards |
6266
| `container` | Dev-toolchain container image |
6367
| `ci` | CI/CD pipeline configuration |
6468
| `makefile` | Makefile targets and patterns |
6569
| `standards` | DevRail standards documentation |
70+
| `security` | Security tooling and configuration |
71+
| `changelog` | Changelog and release notes |
72+
| `release` | Release process and tagging |
6673

6774
### Examples
6875

conventional_commits/config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@
2323
"terraform",
2424
"bash",
2525
"ansible",
26+
"ruby",
27+
"go",
28+
"javascript",
29+
"rust",
2630
"container",
2731
"ci",
2832
"makefile",
2933
"standards",
34+
"security",
35+
"changelog",
36+
"release",
3037
})
3138

3239
# Regex pattern for the conventional commit subject line.

tests/test_check.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,48 @@ def test_test_terraform(self):
6868
)
6969
assert is_valid
7070

71+
def test_feat_ruby(self):
72+
is_valid, _ = validate_commit_message(
73+
"feat(ruby): add brakeman security scanner"
74+
)
75+
assert is_valid
76+
77+
def test_feat_go(self):
78+
is_valid, _ = validate_commit_message(
79+
"feat(go): add golangci-lint configuration"
80+
)
81+
assert is_valid
82+
83+
def test_feat_javascript(self):
84+
is_valid, _ = validate_commit_message(
85+
"feat(javascript): add eslint flat config"
86+
)
87+
assert is_valid
88+
89+
def test_feat_rust(self):
90+
is_valid, _ = validate_commit_message(
91+
"feat(rust): add clippy and rustfmt checks"
92+
)
93+
assert is_valid
94+
95+
def test_chore_security(self):
96+
is_valid, _ = validate_commit_message(
97+
"chore(security): update gitleaks configuration"
98+
)
99+
assert is_valid
100+
101+
def test_docs_changelog(self):
102+
is_valid, _ = validate_commit_message(
103+
"docs(changelog): add v1.1.0 release notes"
104+
)
105+
assert is_valid
106+
107+
def test_chore_release(self):
108+
is_valid, _ = validate_commit_message(
109+
"chore(release): tag v1.1.0"
110+
)
111+
assert is_valid
112+
71113
def test_description_with_numbers(self):
72114
is_valid, _ = validate_commit_message(
73115
"chore(container): bump python from 3.11 to 3.12"
@@ -234,9 +276,16 @@ def test_error_shows_valid_scopes(self):
234276
assert "terraform" in error
235277
assert "bash" in error
236278
assert "ansible" in error
279+
assert "ruby" in error
280+
assert "go" in error
281+
assert "javascript" in error
282+
assert "rust" in error
237283
assert "container" in error
238284
assert "makefile" in error
239285
assert "standards" in error
286+
assert "security" in error
287+
assert "changelog" in error
288+
assert "release" in error
240289

241290
def test_error_shows_examples(self):
242291
_, error = validate_commit_message("bad message")

tests/test_config.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,17 @@ def test_contains_all_required_scopes(self):
3232
"terraform",
3333
"bash",
3434
"ansible",
35+
"ruby",
36+
"go",
37+
"javascript",
38+
"rust",
3539
"container",
3640
"ci",
3741
"makefile",
3842
"standards",
43+
"security",
44+
"changelog",
45+
"release",
3946
}
4047
assert VALID_SCOPES == expected
4148

@@ -48,10 +55,17 @@ def test_no_extra_scopes(self):
4855
"terraform",
4956
"bash",
5057
"ansible",
58+
"ruby",
59+
"go",
60+
"javascript",
61+
"rust",
5162
"container",
5263
"ci",
5364
"makefile",
5465
"standards",
66+
"security",
67+
"changelog",
68+
"release",
5569
}
5670
assert VALID_SCOPES - expected == set()
5771

0 commit comments

Comments
 (0)