-
Notifications
You must be signed in to change notification settings - Fork 414
Expand file tree
/
Copy pathpre-commit-config.yaml
More file actions
70 lines (70 loc) · 2.56 KB
/
pre-commit-config.yaml
File metadata and controls
70 lines (70 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
repos:
- repo: local
hooks:
- id: no-tracing-macro-imports
name: "rust: no direct tracing macro imports"
entry: "bash -c 'if grep -E \"use tracing::(trace|debug|info|warn|error)[^_]|use tracing::\\{[^}]*(trace|debug|info|warn|error)[^_]\" \"$@\"; then echo \"Error: Do not import tracing macros\"; exit 1; fi' --"
language: system
types: [rust]
- id: codespell
name: "python: codespell"
args: [--config=.github/codespellrc]
entry: codespell
language: system
pass_filenames: false
- id: prettier
name: Prettier
entry: bash -c 'cd .github && git -C .. ls-files "*.md" "*.json" "*.yaml" "*.yml" "*.css" "*.js" "*.ts" "*.tsx" | sed "s|^|../|" | xargs pnpm exec prettier --ignore-path ../.prettierignore --check --ignore-unknown --no-error-on-unmatched-pattern'
language: system
pass_filenames: false
- id: website-eslint
name: "website: eslint"
entry: bash -c 'cd website && pnpm exec eslint .'
language: system
pass_filenames: false
files: ^website/.*\.(js|jsx|ts|tsx)$
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: mixed-line-ending
args: ["--fix=lf"]
description: Forces to replace line ending by the UNIX 'lf' character.
exclude: "(^website/public/images/|^kotlin/android/gradlew.bat|^rust/windows-client/wintun/|^elixir/priv/static/)"
- id: check-yaml
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: (^website/public/images/|^elixir/priv/static/|^swift/apple/FirezoneNetworkExtension/Connlib/Generated/)
- id: trailing-whitespace
exclude: (^website/public/images/|^swift/apple/FirezoneNetworkExtension/Connlib/Generated/)
- id: check-merge-conflict
# Third party pre-commit hooks
- repo: local
hooks:
- id: shellcheck
name: ShellCheck
entry: shellcheck
args: ["--severity=warning"]
language: system
types: [shell]
exclude: ^.*/gradlew$
- repo: https://github.com/pecigonzalo/pre-commit-shfmt
rev: v2.2.0
hooks:
- id: shell-fmt
args:
- -i
- "4"
- repo: https://github.com/DevinR528/cargo-sort
rev: v2.0.1
hooks:
- id: cargo-sort
args: ["--check", "--workspace", "rust/"]
- repo: local
hooks:
- id: actionlint
name: actionlint
entry: actionlint
language: system
types: [yaml]
files: ^\.github/workflows/