Specify interface requirements as an C++ concept
[qBittorrent.git] / .pre-commit-config.yaml
blob51be1d0cd7a25dc879b4b6597853d8a56b9eec0e
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.4.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           test/testdata/crlf.txt
39         )$
41     - id: end-of-file-fixer
42       name: Check trailing newlines
43       exclude: |
44         (?x)^(
45           configure |
46           src/webui/www/private/css/lib/.* |
47           src/webui/www/private/scripts/lib/.* |
48           test/testdata/crlf.txt
49         )$
50       exclude_types:
51         - svg
52         - ts
54     - id: trailing-whitespace
55       name: Check trailing whitespaces
56       exclude: |
57         (?x)^(
58           src/webui/www/private/css/lib/.* |
59           src/webui/www/private/scripts/lib/.*
60         )$
61       exclude_types:
62         - ts
64   - repo: https://github.com/codespell-project/codespell
65     rev: v2.2.5
66     hooks:
67     - id: codespell
68       name: Check spelling (codespell)
69       args: ["--ignore-words-list", "additionals,curren,fo,ket,superseeding,te,ths"]
70       exclude: |
71         (?x)^(
72           .*\.desktop |
73           .*\.qrc |
74           build-aux/.* |
75           Changelog |
76           dist/windows/installer-translations/.* |
77           m4/.* |
78           src/base/3rdparty/.* |
79           src/searchengine/nova3/socks.py |
80           src/webui/www/private/scripts/lib/.*
81         )$
82       exclude_types:
83         - ts
85   - repo: https://github.com/crate-ci/typos
86     rev: v1.15.5
87     hooks:
88     - id: typos
89       name: Check spelling (typos)
90       args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
91       exclude: |
92         (?x)^(
93           .*\.asc |
94           .*\.desktop |
95           .*\.qrc |
96           \.pre-commit-config\.yaml |
97           build-aux/.* |
98           Changelog |
99           configure.* |
100           dist/windows/installer-translations/.* |
101           m4/.* |
102           src/base/3rdparty/.* |
103           src/searchengine/nova3/socks.py |
104           src/webui/www/private/scripts/lib/.*
105         )$
106       exclude_types:
107         - svg
108         - ts