Add an option to set BitTorrent session shutdown timeout
[qBittorrent.git] / .pre-commit-config.yaml
blob816654ef8f100cec00c6d2b30ed1373def9fd727
1 repos:
2   - repo: local
3     hooks:
4       - id: check-translation-tag
5         name: Check newline characters in <translation> tag
6         entry: .github/workflows/helper/pre-commit/check_translation_tag.py
7         language: script
8         exclude: |
9           (?x)^(
10             src/lang/.*
11           )$
12         types_or:
13           - ts
15   - repo: https://github.com/pre-commit/pre-commit-hooks.git
16     rev: v4.5.0
17     hooks:
18     - id: check-json
19       name: Check JSON files
21     - id: check-yaml
22       name: Check YAML files
24     - id: fix-byte-order-marker
25       name: Check file encoding (UTF-8 without BOM)
26       exclude: |
27         (?x)^(
28           src/base/unicodestrings.h
29         )$
31     - id: mixed-line-ending
32       name: Check line ending character (LF)
33       args: ["--fix=lf"]
34       exclude: |
35         (?x)^(
36           src/webui/www/private/css/lib/.* |
37           src/webui/www/private/scripts/lib/.* |
38           dist/windows/license.txt |
39           test/testdata/crlf.txt
40         )$
42     - id: end-of-file-fixer
43       name: Check trailing newlines
44       exclude: |
45         (?x)^(
46           configure |
47           src/webui/www/private/css/lib/.* |
48           src/webui/www/private/scripts/lib/.* |
49           test/testdata/crlf.txt
50         )$
51       exclude_types:
52         - svg
53         - ts
55     - id: trailing-whitespace
56       name: Check trailing whitespaces
57       exclude: |
58         (?x)^(
59           src/webui/www/private/css/lib/.* |
60           src/webui/www/private/scripts/lib/.*
61         )$
62       exclude_types:
63         - ts
65   - repo: https://github.com/codespell-project/codespell.git
66     rev: v2.2.6
67     hooks:
68     - id: codespell
69       name: Check spelling (codespell)
70       args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,searchin,superseeding,te,ths"]
71       exclude: |
72         (?x)^(
73           .*\.desktop |
74           .*\.qrc |
75           build-aux/.* |
76           Changelog |
77           dist/windows/installer-translations/.* |
78           m4/.* |
79           src/base/3rdparty/.* |
80           src/searchengine/nova3/socks.py |
81           src/webui/www/private/lang/.* |
82           src/webui/www/private/scripts/lib/.* |
83           src/webui/www/public/lang/.* |
84           src/webui/www/public/scripts/lib/.* |
85           src/webui/www/transifex/.*
86         )$
87       exclude_types:
88         - ts
90   - repo: https://github.com/crate-ci/typos.git
91     rev: v1.16.18
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           build-aux/.* |
103           Changelog |
104           configure.* |
105           dist/windows/installer-translations/.* |
106           m4/.* |
107           src/base/3rdparty/.* |
108           src/searchengine/nova3/socks.py |
109           src/webui/www/private/lang/.* |
110           src/webui/www/private/scripts/lib/.* |
111           src/webui/www/public/lang/.* |
112           src/webui/www/public/scripts/lib/.* |
113           src/webui/www/transifex/.*
114         )$
115       exclude_types:
116         - svg
117         - ts