Store search history
[qBittorrent.git] / .pre-commit-config.yaml
blobfbf101d28eb22b9dd61c3dd1eaa5f673ffd5f868
1 repos:
2   - repo: local
3     hooks:
4       - id: check-grid-order
5         name: Check items order in grid layouts
6         entry: .github/workflows/helper/pre-commit/check_grid_items_order.py
7         language: script
8         files: \.ui$
10       - id: check-translation-tag
11         name: Check newline characters in <translation> tag
12         entry: .github/workflows/helper/pre-commit/check_translation_tag.py
13         language: script
14         exclude: |
15           (?x)^(
16             src/lang/.*
17           )$
18         types_or:
19           - ts
21   - repo: https://github.com/pre-commit/pre-commit-hooks.git
22     rev: v5.0.0
23     hooks:
24     - id: check-json
25       name: Check JSON files
27     - id: check-yaml
28       name: Check YAML files
30     - id: fix-byte-order-marker
31       name: Check file encoding (UTF-8 without BOM)
32       exclude: |
33         (?x)^(
34           src/base/unicodestrings.h
35         )$
37     - id: mixed-line-ending
38       name: Check line ending character (LF)
39       args: ["--fix=lf"]
40       exclude: |
41         (?x)^(
42           src/webui/www/private/css/lib/.* |
43           src/webui/www/private/scripts/lib/.* |
44           dist/windows/license.txt |
45           test/testdata/crlf.txt
46         )$
48     - id: end-of-file-fixer
49       name: Check trailing newlines
50       exclude: |
51         (?x)^(
52           configure |
53           src/webui/www/private/css/lib/.* |
54           src/webui/www/private/scripts/lib/.* |
55           test/testdata/crlf.txt
56         )$
57       exclude_types:
58         - svg
59         - ts
61     - id: trailing-whitespace
62       name: Check trailing whitespaces
63       exclude: |
64         (?x)^(
65           src/webui/www/private/css/lib/.* |
66           src/webui/www/private/scripts/lib/.*
67         )$
68       exclude_types:
69         - ts
71   - repo: https://github.com/codespell-project/codespell.git
72     rev: v2.4.0
73     hooks:
74     - id: codespell
75       name: Check spelling (codespell)
76       args: ["--ignore-words-list", "additionals,categor,curren,fo,ist,ket,notin,searchin,sectionin,superseeding,te,ths"]
77       exclude: |
78         (?x)^(
79           .*\.desktop |
80           .*\.qrc |
81           Changelog |
82           dist/windows/installer-translations/.* |
83           src/base/3rdparty/.* |
84           src/searchengine/nova3/socks.py |
85           src/webui/www/private/scripts/lib/.*
86         )$
87       exclude_types:
88         - ts
90   - repo: https://github.com/crate-ci/typos.git
91     rev: v1.29.4
92     hooks:
93     - id: typos
94       name: Check spelling (typos)
95       args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
96       exclude: |
97         (?x)^(
98           .*\.asc |
99           .*\.desktop |
100           .*\.qrc |
101           \.pre-commit-config\.yaml |
102           Changelog |
103           dist/windows/installer-translations/.* |
104           src/base/3rdparty/.* |
105           src/searchengine/nova3/socks.py |
106           src/webui/www/private/scripts/lib/.*
107         )$
108       exclude_types:
109         - svg
110         - ts