-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
105 lines (98 loc) · 3.18 KB
/
.pre-commit-config.yaml
File metadata and controls
105 lines (98 loc) · 3.18 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-toml
- id: check-yaml
args: ["--unsafe"] # only check syntax for yaml files
- id: check-json
- id: mixed-line-ending
files: "\\.(py|txt|yaml|json|md|toml|lock|cfg|html|sh|js|yml)$"
- id: trailing-whitespace
files: "\\.(py|txt|yaml|json|md|toml|lock|cfg|html|sh|js|yml)$"
- id: end-of-file-fixer
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: check-case-conflict
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.13
hooks:
# Run the linter.
- id: ruff-check
name: ruff-check (experiment_in_computer_vision)
files: ^experiment_in_computer_vision/.*\.py$
# Run the formatter.
- id: ruff-format
name: ruff-format (experiment_in_computer_vision)
files: ^experiment_in_computer_vision/.*\.py$
- id: ruff-check
name: ruff-check (rag_stack)
files: ^rag_stack/.*\.py$
- id: ruff-format
name: ruff-format (rag_stack)
files: ^rag_stack/.*\.py$
- id: ruff-check
name: ruff-check (self_hosted_agent)
files: ^self_hosted_agent/.*\.py$
- id: ruff-format
name: ruff-format (self_hosted_agent)
files: ^self_hosted_agent/.*\.py$
- id: ruff-check
name: ruff-check (vision_on_the_edge)
files: ^vision_on_the_edge/.*\.py$
- id: ruff-format
name: ruff-format (vision_on_the_edge)
files: ^vision_on_the_edge/.*\.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
name: mypy (experiment_in_computer_vision)
args:
- "--config-file=mypy.ini"
- "--install-types"
- "--non-interactive"
files: ^experiment_in_computer_vision/.*\.py$
- id: mypy
name: mypy (rag_stack)
args:
- "--config-file=mypy.ini"
- "--install-types"
- "--non-interactive"
files: ^rag_stack/.*\.py$
- id: mypy
name: mypy (self_hosted_agent)
args:
- "--config-file=mypy.ini"
- "--install-types"
- "--non-interactive"
files: ^self_hosted_agent/.*\.py$
- id: mypy
name: mypy (vision_on_the_edge)
args:
- "--config-file=mypy.ini"
- "--install-types"
- "--non-interactive"
files: ^vision_on_the_edge/.*\.py$
- repo: https://github.com/crate-ci/typos
rev: v1.42.1
hooks:
- id: typos
args: [--config=typos.toml]
pass_filenames: false
- repo: https://github.com/PyCQA/bandit
rev: 1.9.3
hooks:
- id: bandit
args: ["--config=bandit.yaml"]
- repo: local
hooks:
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
entry: bash -c 'docker run --rm -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --since-commit HEAD --only-verified --fail'
language: system
stages: ["pre-commit", "pre-push"]