Skip to content

Commit f7b5944

Browse files
authored
tooling: Enforce commitlint scope-enum as error. (#235)
* tooling: Enforce commitlint scope-enum as error. * docs: Document enforced scope-enum in CONTRIBUTING.
1 parent 17508d1 commit f7b5944

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ Commit messages follow the [Conventional Commits](https://www.conventionalcommit
6868

6969
**Types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `ci`, `build`, `chore`, `perf`, `revert`, `tooling`
7070

71-
**Scopes** (optional): driver names (`hts221`, `ism330dl`, `wsen-pads`...) or domains (`ci`, `docs`, `style`, `tests`, `tooling`). The scope is recommended for driver-specific changes but can be omitted for cross-cutting changes.
71+
**Scopes** (optional but enforced): if provided, the scope **must** be one of the allowed values. The scope is recommended for driver-specific changes but can be omitted for cross-cutting changes.
72+
73+
- Driver scopes: `apds9960`, `bme280`, `bq27441`, `daplink_flash`, `gc9a01`, `hts221`, `im34dt05`, `ism330dl`, `lis2mdl`, `mcp23009e`, `ssd1327`, `steami_config`, `vl53l1x`, `wsen-hids`, `wsen-pads`
74+
- Domain scopes: `ci`, `docs`, `style`, `tests`, `tooling`
7275

7376
### Examples
7477

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
'subject-full-stop': [0],
1111
'header-max-length': [2, 'always', 78],
1212
'scope-enum': [
13-
1,
13+
2,
1414
'always',
1515
[
1616
'apds9960',

0 commit comments

Comments
 (0)