WebUI: Improve hash copy actions in context menu
[qBittorrent.git] / .pre-commit-config.yaml
blob504c83adae11231e831d748ac0c16ae92d958fb9
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/scripts/lib/.*
82         )$
83       exclude_types:
84         - ts
86   - repo: https://github.com/crate-ci/typos.git
87     rev: v1.16.18
88     hooks:
89     - id: typos
90       name: Check spelling (typos)
91       args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
92       exclude: |
93         (?x)^(
94           .*\.asc |
95           .*\.desktop |
96           .*\.qrc |
97           \.pre-commit-config\.yaml |
98           build-aux/.* |
99           Changelog |
100           configure.* |
101           dist/windows/installer-translations/.* |
102           m4/.* |
103           src/base/3rdparty/.* |
104           src/searchengine/nova3/socks.py |
105           src/webui/www/private/scripts/lib/.*
106         )$
107       exclude_types:
108         - svg
109         - ts