Skip to content

Commit a452121

Browse files
committed
chore: enable pre-commit for commit linting
Give developers a local to verify commit messages before entering the longer CI roundtrip.
1 parent 932ff3e commit a452121

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
default_install_hook_types:
3+
- pre-commit
4+
- commit-msg
5+
repos:
6+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
7+
rev: v9.4.0
8+
hooks:
9+
- id: commitlint
10+
stages: [commit-msg]
11+
additional_dependencies: ["@commitlint/config-angular"]
12+
args: ["--config", "./commitlint.config.js"]

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
# modelix.core
2+
23
All the Modelix components that don't have a dependency on JetBrains MPS
4+
5+
## Development
6+
7+
### Commit convention
8+
9+
This project uses [conventional commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) as the convention for Git commits.
10+
11+
### pre-commit
12+
13+
This project uses [pre-commit](https://pre-commit.com/) to validate that new commits follow intended conventions.
14+
To enable pre-commit hooks, you have to run the following command initially after cloning the repository:
15+
16+
```console
17+
$ pre-commit install
18+
pre-commit installed at .git/hooks/pre-commit
19+
```

0 commit comments

Comments
 (0)