WebUI: Apply box-sizing reset
[qBittorrent.git] / .pre-commit-config.yaml
bloba4c84ea2d4185fd39d0fda1b74f135d6436a91c6
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.6.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.3.0
67     hooks:
68     - id: codespell
69       name: Check spelling (codespell)
70       args: ["--ignore-words-list", "additionals,categor,curren,fo,ist,ket,notin,searchin,sectionin,superseeding,te,ths"]
71       exclude: |
72         (?x)^(
73           .*\.desktop |
74           .*\.qrc |
75           Changelog |
76           dist/windows/installer-translations/.* |
77           src/base/3rdparty/.* |
78           src/searchengine/nova3/socks.py |
79           src/webui/www/private/scripts/lib/.*
80         )$
81       exclude_types:
82         - ts
84   - repo: https://github.com/crate-ci/typos.git
85     rev: v1.25.0
86     hooks:
87     - id: typos
88       name: Check spelling (typos)
89       args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
90       exclude: |
91         (?x)^(
92           .*\.asc |
93           .*\.desktop |
94           .*\.qrc |
95           \.pre-commit-config\.yaml |
96           Changelog |
97           dist/windows/installer-translations/.* |
98           src/base/3rdparty/.* |
99           src/searchengine/nova3/socks.py |
100           src/webui/www/private/scripts/lib/.*
101         )$
102       exclude_types:
103         - svg
104         - ts