Skip to content

Commit 118fe20

Browse files
committed
Resolve #14 -- Add offical pre-commit hooks
1 parent 5550e43 commit 118fe20

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- id: msgcheck
2+
name: msgcheck
3+
description: 'Perform various checks on gettext files'
4+
entry: msgcheck
5+
language: python
6+
types:
7+
- pofile

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ The environment variable `MSGCHECK_OPTIONS` can be set with some default options
7373
The script returns exit code **0** if all files checked are OK (0 errors or option
7474
`--extract` given) or it returns **N**: number of files with errors (1 ≤ N ≤ 255).
7575

76+
### pre-commit
77+
78+
To use msgcheck with [pre-commit](https://pre-commit.com/), add the following to your `.pre-commit-config.yaml`:
79+
80+
```yaml
81+
- repo: https://github.com/flashcode/msgcheck
82+
rev: v4.1.0 # Use the latest tag or a specific commit hash
83+
hooks:
84+
- id: msgcheck
85+
args: [] # add optional arguments like '--fuzzy', see above
86+
```
87+
7688
## Example
7789
7890
```

0 commit comments

Comments
 (0)