|
5 | 5 | - id: trailing-whitespace |
6 | 6 | - id: end-of-file-fixer |
7 | 7 | - id: check-added-large-files |
| 8 | + args: ["--maxkb=1000"] |
8 | 9 | - id: check-yaml |
9 | 10 | - id: check-json |
| 11 | + - id: check-merge-conflict |
| 12 | + - id: detect-private-key |
| 13 | + - id: no-commit-to-branch |
| 14 | + args: ["--branch", "production"] |
10 | 15 |
|
11 | 16 | - repo: https://github.com/pycqa/flake8 |
12 | 17 | rev: 7.0.0 |
13 | 18 | hooks: |
14 | 19 | - id: flake8 |
15 | | - additional_dependencies: [flake8] |
16 | | - args: ['--max-line-length=100'] |
17 | | - files: \.py$ # <-- check all Python files globally |
| 20 | + args: ["--max-line-length=100"] |
| 21 | + files: \.py$ |
18 | 22 | exclude: ^(venv|env|\.git)/ |
19 | 23 |
|
20 | 24 | - repo: https://github.com/codespell-project/codespell |
21 | 25 | rev: v2.2.2 |
22 | 26 | hooks: |
23 | 27 | - id: codespell |
| 28 | + exclude: ^(package-lock\.json|yarn\.lock|\.expo/) |
| 29 | + args: ["--skip=*.lock,*.min.js,*.json"] |
24 | 30 |
|
25 | 31 | - repo: local |
26 | 32 | hooks: |
27 | | - - id: mask-env |
28 | | - name: Mask secrets in all files |
| 33 | + - id: mask-secrets |
| 34 | + name: Mask secrets in staged files |
29 | 35 | entry: python scripts/mask_keys.py |
30 | 36 | language: system |
| 37 | + pass_filenames: true |
31 | 38 | types: [text] |
| 39 | + exclude: >- |
| 40 | + (?x)^( |
| 41 | + scripts/mask_keys\.py| |
| 42 | + \.pre-commit-config\.yaml| |
| 43 | + .*\.lock|.*\.png|.*\.jpg| |
| 44 | + .*\.svg|.*\.exe|.*\.bin |
| 45 | + )$ |
| 46 | +
|
| 47 | + - id: compile-check |
| 48 | + name: Syntax and compile check (auto language detection) |
| 49 | + entry: python scripts/compile_check.py |
| 50 | + language: system |
| 51 | + pass_filenames: true |
| 52 | + types: [text] |
| 53 | + exclude: >- |
| 54 | + (?x)^( |
| 55 | + .*\.lock|.*\.md|.*\.txt| |
| 56 | + .*\.png|.*\.jpg|.*\.svg| |
| 57 | + .*\.json|.*\.yaml|.*\.yml| |
| 58 | + .*\.env.*|.*\.gitignore| |
| 59 | + .*\.css|.*\.scss|.*\.html |
| 60 | + )$ |
32 | 61 |
|
33 | 62 | - id: check-requirements |
34 | 63 | name: Check requirements file syntax |
35 | 64 | entry: python scripts/check_requirements.py |
36 | 65 | language: system |
37 | | - types: [file] |
| 66 | + pass_filenames: false |
38 | 67 | files: ^requirements\.txt$ |
0 commit comments