Skip to content

Commit b1a16b6

Browse files
authored
Add offical pre-commit hooks (#15) (closes #14)
1 parent 5550e43 commit b1a16b6

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-FileCopyrightText: 2025 Sébastien Helleu <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
- id: msgcheck
6+
name: msgcheck
7+
description: 'Perform various checks on gettext files'
8+
entry: msgcheck
9+
language: python
10+
types:
11+
- 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)