Skip to content

Commit 5f9c312

Browse files
authored
Refactor: classes for format checking (#119)
2 parents 3f1bb61 + 4684800 commit 5f9c312

File tree

11 files changed

+611
-395
lines changed

11 files changed

+611
-395
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "compilerla/conventional-pre-commit",
3-
"dockerComposeFile": ["./compose.yml"],
3+
"dockerComposeFile": ["../compose.yml"],
44
"service": "dev",
55
"runServices": ["dev"],
66
"workspaceFolder": "/home/compiler/src",

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ Create a blank configuration file at the root of your repo, if needed:
1515
touch .pre-commit-config.yaml
1616
```
1717

18-
Add a new repo entry to your configuration file:
18+
Add/update `default_install_hook_types` and add a new repo entry in your configuration file:
1919

2020
```yaml
21+
default_install_hook_types:
22+
- pre-commit
23+
- commit-msg
24+
2125
repos:
2226
# - repo: ...
2327

@@ -32,7 +36,7 @@ repos:
3236
Install the `pre-commit` script:
3337

3438
```console
35-
pre-commit install --hook-type commit-msg
39+
pre-commit install --install-hooks
3640
```
3741

3842
Make a (normal) commit :x::
@@ -74,9 +78,7 @@ Conventional Commit messages follow a pattern like:
7478
7579
Please correct the following errors:
7680
77-
- Expected value for 'type' but found none.
78-
- Expected value for 'delim' but found none.
79-
- Expected value for 'subject' but found none.
81+
- Expected value for type from: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
8082
8183
Run:
8284
@@ -151,8 +153,8 @@ options:
151153
-h, --help show this help message and exit
152154
--no-color Disable color in output.
153155
--force-scope Force commit to have scope defined.
154-
--scopes SCOPES Optional list of scopes to support. Scopes should be separated by commas with no spaces (e.g. api,client)
155-
--strict Force commit to strictly follow Conventional Commits formatting. Disallows fixup! style commits.
156+
--scopes SCOPES List of scopes to support. Scopes should be separated by commas with no spaces (e.g. api,client).
157+
--strict Force commit to strictly follow Conventional Commits formatting. Disallows fixup! and merge commits.
156158
--verbose Print more verbose error output.
157159
```
158160

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
services:
22
dev:
33
build:
4-
context: ..
4+
context: .
55
dockerfile: .devcontainer/Dockerfile
66
entrypoint: []
77
command: sleep infinity
88
image: compilerla/conventional-pre-commit:dev
99
volumes:
10-
- ../:/home/compiler/src
10+
- ./:/home/compiler/src

0 commit comments

Comments
 (0)