-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
72 lines (65 loc) · 1.77 KB
/
.pre-commit-config.yaml
File metadata and controls
72 lines (65 loc) · 1.77 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
71
72
# Pre-commit hooks for code-indexer
# See https://pre-commit.com for more information
# Install: pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Ruff - Fast Python linter (replaces flake8, isort, etc.)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
name: ruff linter
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi]
- id: ruff-format
name: ruff formatter
types_or: [python, pyi]
# Mypy - Static type checker
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
name: mypy type checker
args: [--config-file=pyproject.toml]
additional_dependencies:
- types-PyYAML>=6.0.0
- types-requests>=2.28.0
- types-cachetools>=5.0.0
files: ^src/
exclude: ^tests/
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: trim trailing whitespace
- id: end-of-file-fixer
name: fix end of files
- id: check-yaml
name: check yaml syntax
- id: check-added-large-files
name: check for large files
args: [--maxkb=1000]
- id: check-merge-conflict
name: check for merge conflicts
- id: check-case-conflict
name: check for case conflicts
# Configuration
default_language_version:
python: python3.9
# Exclude patterns
exclude: |
(?x)^(
tests/fixtures/cidx-test-repo/.*|
\.git/.*|
\.venv/.*|
__pycache__/.*|
\.eggs/.*|
\.tox/.*|
build/.*|
dist/.*
)$
# Fail fast on first error
fail_fast: false
# Minimum pre-commit version
minimum_pre_commit_version: '3.0.0'